Page MenuHomePhabricator

Added another optimization pass to make vectorizing possible
ClosedPublic

Authored by emmettneyman on Aug 8 2018, 4:54 PM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

emmettneyman created this revision.Aug 8 2018, 4:54 PM
  • minor style fix
morehouse added inline comments.Aug 8 2018, 5:09 PM
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
90 ↗(On Diff #159830)

If you have to pass that many parameters to a 3 line function, just inline instead.

126 ↗(On Diff #159830)

Is TM guaranteed to be an LLVMTargetMachine?

emmettneyman added inline comments.Aug 8 2018, 5:28 PM
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
126 ↗(On Diff #159830)

Yes, since the target triple will always be X86.

  • Inlined function
morehouse accepted this revision.Aug 8 2018, 5:38 PM
morehouse added inline comments.
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
103 ↗(On Diff #159834)

I think you can avoid creating a Triple and instead just call M->getTargetTriple() in lookupTarget below.

This revision is now accepted and ready to land.Aug 8 2018, 5:38 PM
emmettneyman added inline comments.Aug 8 2018, 5:43 PM
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
103 ↗(On Diff #159834)

M->getTargetTriple() returns a std::string and both lookupTarget() and TargetLibraryInfoWrapperPass() take a Triple object.

This revision was automatically updated to reflect the committed changes.