Tweak generic target.

This commit is contained in:
james.brodman
2013-10-23 18:01:01 -04:00
parent c4ad8f6ed4
commit d2b89e0e37
2 changed files with 73 additions and 61 deletions

View File

@@ -536,8 +536,11 @@ Optimize(llvm::Module *module, int optLevel) {
}
optPM.add(llvm::createDeadInstEliminationPass(), 220);
optPM.add(llvm::createIPConstantPropagationPass());
optPM.add(CreateReplaceStdlibShiftPass());
if (g->target->getISA() != Target::GENERIC) {
// Just use the builtins for generic targets.
optPM.add(llvm::createIPConstantPropagationPass());
optPM.add(CreateReplaceStdlibShiftPass());
}
// Max struct size threshold for scalar replacement is
// 1) 4 fields (r,g,b,w)