Function accumulateAndSortLibcalls in LTOCodeGenerator.cpp collects names of runtime library functions to protect user-supplied runtime library functions (which was committed in r194514). Currently, this function only scans the TargetLowering object belonging to the "main" subtarget for the library function names. This has to be changed to scan all subtargets now that we have per-function subtarget objects.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
The change in llvm-lto.cpp is needed for the test case and it should be committed first as a separate patch.
Comment Actions
Seems reasonable. Please add a block comment to the accumulateAndSortLibcalls explaining what it's there for and a brief comment over CodeGen.setCpu explaining that we're setting the cpu (and the underneath attrs) for the default target/subtarget for the module.
Thanks!
-eric