Speed up the method RequiresStackProtector by checking the intrinsic
value of the call. The original code calls getName() that returns an
allocating std::string on each check. This change removes about 96072 std::string
instances when compiling sqlite3.c; The function was discovered with a
Facebook-internal performance tool.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
120 ms | linux > Polly.ScopInfo::Unknown Unit Message ("") |
Event Timeline
llvm/lib/CodeGen/StackProtector.cpp | ||
---|---|---|
257 | Can this just be CI->getIntrinsicID() == Intrinsic::stackprotector? |
Can this just be CI->getIntrinsicID() == Intrinsic::stackprotector?