1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib/Analysis
Nicolai Haehnle 05e3f6a82a AMDGPU: mark {exp,log}10{,f,l} library functions as unavailable
Summary:
The SimplifyLibCalls part of InstCombine generates calls to those otherwise.

I wonder if at some point we shouldn't just call disableAllFunctions() and
then enable functions on a whitelist basis...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96495

Reviewers: arsenm, tstellarAMD

Subscribers: llvm-commits, kzhuravl

Differential Revision: http://reviews.llvm.org/D21282

llvm-svn: 272664
2016-06-14 13:14:53 +00:00
..
AliasAnalysis.cpp Fix AAResults::callCapturesBefore for operand bundles 2016-06-13 19:55:04 +00:00
AliasAnalysisEvaluator.cpp
AliasSetTracker.cpp [AliasSetTracker] Correctly handle changing the size of an entry 2016-04-14 22:00:11 +00:00
Analysis.cpp [PM] Port LVI to the new PM. 2016-06-13 22:01:25 +00:00
AssumptionCache.cpp
BasicAliasAnalysis.cpp Revert "Claim NoAlias if two GEPs index different fields of the same struct" 2016-06-01 18:55:32 +00:00
BitSetUtils.cpp Re-apply r269081 and r269082 with a fix for MSVC. 2016-05-10 18:07:21 +00:00
BlockFrequencyInfo.cpp [PM] port Branch Frequency Analaysis pass to new PM 2016-05-05 21:13:27 +00:00
BlockFrequencyInfoImpl.cpp fix spelling; NFC 2016-05-09 16:07:45 +00:00
BranchProbabilityInfo.cpp [PM] Port Branch Probability Analysis pass to the new pass manager. 2016-05-05 02:59:57 +00:00
CallGraph.cpp
CallGraphSCCPass.cpp Interprocedural Register Allocation (IPRA) Analysis 2016-06-10 16:19:46 +00:00
CallPrinter.cpp
CaptureTracking.cpp [CaptureTracking] Volatile operations capture their memory location 2016-05-26 17:36:22 +00:00
CFG.cpp
CFGPrinter.cpp
CFLAliasAnalysis.cpp Attempt to make windows buildbots happy. 2016-06-13 19:38:49 +00:00
CGSCCPassManager.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
CMakeLists.txt Reapply r271728 after adding move cobstructor for ProfileSummaryInfo 2016-06-03 22:54:26 +00:00
CodeMetrics.cpp
ConstantFolding.cpp [ConstantFolding, ValueTracking] Fold constants involving bitcasts of ConstantVector 2016-05-04 06:13:33 +00:00
CostModel.cpp [CodeGen] Teach LLVM how to lower @llvm.{min,max}num to {MIN,MAX}NAN 2016-04-14 07:13:24 +00:00
Delinearization.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
DemandedBits.cpp Port DemandedBits to the new pass manager. 2016-04-18 23:55:01 +00:00
DependenceAnalysis.cpp Apply most suggestions of clang-tidy's performance-unnecessary-value-param 2016-06-08 19:09:22 +00:00
DivergenceAnalysis.cpp DivergenceAnalysis: Fix crash with no return blocks 2016-05-09 16:57:08 +00:00
DominanceFrontier.cpp
DomPrinter.cpp
EHPersonalities.cpp X86: permit using SjLj EH on x86 targets as an option 2016-05-31 01:48:07 +00:00
GlobalsModRef.cpp Don't IPO over functions that can be de-refined 2016-04-08 00:48:30 +00:00
InlineCost.cpp Use ProfileSummaryInfo in inline cost analysis. 2016-06-09 22:23:21 +00:00
InstCount.cpp
InstructionSimplify.cpp Avoid copies of std::strings and APInt/APFloats where we only read from it 2016-06-08 10:01:20 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp Correct IDF calculator for ReverseIDF 2016-04-19 06:13:28 +00:00
IVUsers.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp [PM] Port LVI to the new PM. 2016-06-13 22:01:25 +00:00
Lint.cpp
LLVMBuild.txt Revert r269131 2016-05-10 23:26:04 +00:00
Loads.cpp Apply most suggestions of clang-tidy's performance-unnecessary-value-param 2016-06-08 19:09:22 +00:00
LoopAccessAnalysis.cpp Revert r272194 No need for it if loop Analysis Manager is used 2016-06-09 03:22:39 +00:00
LoopInfo.cpp Look for a loop's starting location in the llvm.loop metadata 2016-05-25 21:42:37 +00:00
LoopPass.cpp Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
LoopPassManager.cpp PM: Check that loop passes preserve a basic set of analyses 2016-05-03 21:35:08 +00:00
LoopUnrollAnalyzer.cpp [LoopUnrollAnalyzer] Fix a crash in analyzeLoopUnrollCost. 2016-06-06 19:21:40 +00:00
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp Calculate __builtin_object_size when pointer depends on a condition 2016-04-13 12:25:25 +00:00
MemoryDependenceAnalysis.cpp NFC: make AtomicOrdering an enum class 2016-04-06 21:19:33 +00:00
MemoryLocation.cpp [TLI] Unify LibFunc signature checking. NFCI. 2016-04-27 19:04:35 +00:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp ThinLTO: fix assertion and refactor check for hidden use from inline ASM in a helper function 2016-05-06 08:25:33 +00:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp Add null checks before using a pointer. 2016-06-10 01:42:05 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp Minor clean up in loopHasNoAbnormalExits; NFC 2016-06-09 01:14:03 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp [SCEV] Keep SCEVExpander insert points consistent. 2016-06-01 20:03:09 +00:00
ScalarEvolutionNormalization.cpp Remove emacs mode markers from .cpp files. NFC 2016-04-24 17:55:41 +00:00
ScopedNoAliasAA.cpp
SparsePropagation.cpp
StratifiedSets.h [CFLAA] Handle global/arg attrs more sanely. 2016-06-09 23:15:04 +00:00
TargetLibraryInfo.cpp AMDGPU: mark {exp,log}10{,f,l} library functions as unavailable 2016-06-14 13:14:53 +00:00
TargetTransformInfo.cpp Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp
ValueTracking.cpp [LICM] Make isGuaranteedToExecute more accurate. 2016-06-11 21:48:25 +00:00
VectorUtils.cpp [Analysis] Enabled BITREVERSE as a vectorizable intrinsic 2016-06-04 20:21:07 +00:00

Analysis Opportunities:

//===---------------------------------------------------------------------===//

In test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll, the
ScalarEvolution expression for %r is this:

  {1,+,3,+,2}<loop>

Outside the loop, this could be evaluated simply as (%n * %n), however
ScalarEvolution currently evaluates it as

  (-2 + (2 * (trunc i65 (((zext i64 (-2 + %n) to i65) * (zext i64 (-1 + %n) to i65)) /u 2) to i64)) + (3 * %n))

In addition to being much more complicated, it involves i65 arithmetic,
which is very inefficient when expanded into code.

//===---------------------------------------------------------------------===//

In formatValue in test/CodeGen/X86/lsr-delayed-fold.ll,

ScalarEvolution is forming this expression:

((trunc i64 (-1 * %arg5) to i32) + (trunc i64 %arg5 to i32) + (-1 * (trunc i64 undef to i32)))

This could be folded to

(-1 * (trunc i64 undef to i32))

//===---------------------------------------------------------------------===//