[PATCH] Have a way to let fast-isel handle normally optimized library functions
reed kotler
rkotler at mips.com
Wed Feb 4 13:42:12 PST 2015
I don't know what the current logic is behind having fast-isel not treat these C library as ordinary functions so I'm not prepared to force what I want on other ports. It clearly makes no sense in the MIps port because the result is that fast-isel will quit there and for Mips we are trying to minimize this behavior so that the code generation runs faster.
In method: void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) , in SelectionDAGISel.cpp it asks the question if (FastIS->selectInstruction(Inst)) { .... if the answer is false then it will proceed to
// Then handle certain instructions as single-LLVM-Instruction blocks.
if (isa<CallInst>(Inst)) {
if (EnableFastISelVerbose || EnableFastISelAbort) {
dbgs() << "FastISel missed call: ";
Inst->dump();
}
and hence the call is missed.
In method bool FastISel::selectInstruction(const Instruction *I) is where the logic is that I'm changing.
Someone has made a conscious choice, which I assume also has "make check" tests that will fail otherwise,
to not treat these builtin C library functions as ordinary functions and hence make fast-isel fail here and
revert to non fast-isel.
Anyone that wants the behavior I want for mips fast-isel can just turn this on as I have in the constructor
for their fast isel:
HandleOptimizedCodeGenFunctions(false)
If everyone decides to do that then we could change the original code but I'm not prepared to submit a patch
that makes this decision for other target ports.
http://reviews.llvm.org/D7397
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list