llvm-project/llvm/lib/Transforms/IPO
Philip Reames 11707435cc [inferattrs] Don't infer lib func attributes for nobuiltin functions
If we have a nobuiltin function, we can't assume we know anything about the implementation.

I noticed this when tracing through a log from an in the wild miscompile (https://github.com/emscripten-core/emscripten/issues/9443) triggered after 8666463.  We were incorrectly assuming that a custom allocator could not free.  (It's not clear yet this is the only problem in said issue.)

I also noticed something similiar mentioned in the commit message of ab243e when scrolling back through history.  Through, from what I can tell, that commit fixed symptom not root cause.

The interface we have for library function detection is extremely error prone, but given the interaction between ``nobuiltin`` decls and ``builtin`` callsites, it's really hard to imagine something much cleaner.  I may iterate on that, but it'll be invasive enough I didn't want to hold an obvious functional fix on it.
2021-04-16 15:36:15 -07:00
..
AlwaysInliner.cpp [coroutine] should disable inline before calling coro split 2020-12-08 08:53:08 -08:00
Annotation2Metadata.cpp Add pass to add !annotate metadata from @llvm.global.annotations. 2020-11-16 14:57:11 +00:00
ArgumentPromotion.cpp Revert "[ArgPromotion] Copy additional metadata for loads." 2021-03-26 21:34:54 +01:00
Attributor.cpp Plumb AssumeInst through operand bundle apis [nfc] 2021-04-06 12:53:53 -07:00
AttributorAttributes.cpp [NFC][ConstantRange] Add 'icmp' helper method 2021-04-10 19:38:55 +03:00
BarrierNoopPass.cpp
BlockExtractor.cpp [BlockExtract][NewPM] Port -extract-blocks to NPM 2020-10-21 12:51:11 -07:00
CMakeLists.txt [IRSim][IROutliner] Adding the extraction basics for the IROutliner. 2020-12-17 11:27:26 -06:00
CalledValuePropagation.cpp
ConstantMerge.cpp
CrossDSOCFI.cpp
DeadArgumentElimination.cpp [DAE] Adjust param/arg attributes when changing parameter to undef 2021-03-25 14:53:22 -07:00
ElimAvailExtern.cpp
ExtractGV.cpp [Transforms] Use range-based for loops (NFC) 2021-02-08 22:33:53 -08:00
ForceFunctionAttrs.cpp [IR] Add vscale_range IR function attribute 2021-03-22 12:05:06 +00:00
FunctionAttrs.cpp [funcattrs] Add the maximal set of implied attributes to definitions 2021-04-16 14:22:19 -07:00
FunctionImport.cpp [FunctionImport] Delete unneeded setLive. NFC 2021-03-06 14:09:54 -08:00
GlobalDCE.cpp
GlobalOpt.cpp Revert "[GlobalOpt] Revert valgrind hacks" 2021-04-13 17:47:07 -07:00
GlobalSplit.cpp
HotColdSplitting.cpp [Transforms/IPO] Use range-based for loops (NFC) 2021-02-03 20:41:20 -08:00
IPO.cpp [IRSim][IROutliner] Adding the extraction basics for the IROutliner. 2020-12-17 11:27:26 -06:00
IROutliner.cpp IROutliner.cpp - fix Wdocumentation warning. NFCI. 2021-02-05 11:38:09 +00:00
InferFunctionAttrs.cpp [inferattrs] Don't infer lib func attributes for nobuiltin functions 2021-04-16 15:36:15 -07:00
InlineSimple.cpp
Inliner.cpp [NFC][Inliner] Debugging support to print funtion size after each inlining. 2021-03-14 22:11:53 -07:00
Internalize.cpp collectUsedGlobalVariables: migrate SmallPtrSetImpl overload to SmallVecImpl overload after D97128 2021-02-23 16:09:06 -08:00
LoopExtractor.cpp [LoopExtract][NewPM] Port -loop-extract to NPM 2020-10-13 22:55:42 -07:00
LowerTypeTests.cpp Use AssumeInst in a few more places [nfc] 2021-04-06 13:18:53 -07:00
MergeFunctions.cpp [Transforms/IPO] Use range-based for loops (NFC) 2021-02-03 20:41:20 -08:00
OpenMPOpt.cpp [clang][OpenMP] Use OpenMPIRBuilder for workshare loops. 2021-03-04 22:52:59 -06:00
PartialInlining.cpp NFC: Migrate PartialInlining to work on InstructionCost 2021-03-30 11:59:45 +01:00
PassManagerBuilder.cpp [PassManager][PhaseOrdering] lower expects before running simplifyCFG 2021-04-12 15:07:53 -04:00
PruneEH.cpp [PruneEH][NFC] Use CallGraphUpdater in PruneEH 2020-09-14 14:43:19 -07:00
SCCP.cpp Add a missing file header comment, NFC. 2021-03-26 15:34:04 -07:00
SampleContextTracker.cpp [CSSPGO] Top-down processing order based on full profile. 2021-03-30 10:42:22 -07:00
SampleProfile.cpp [CSSPGO] Fix incorrect probe distribution factor computation in top-down inliner 2021-04-07 08:48:59 -07:00
SampleProfileProbe.cpp [CSSPGO] Unblocking optimizations by dangling pseudo probes. 2021-03-03 22:44:42 -08:00
StripDeadPrototypes.cpp
StripSymbols.cpp [Transforms] Use range-based for loops (NFC) 2021-02-08 22:33:53 -08:00
SyntheticCountsPropagation.cpp
ThinLTOBitcodeWriter.cpp [ThinLTO] Make cloneUsedGlobalVariables deterministic 2021-02-23 16:09:05 -08:00
WholeProgramDevirt.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00