1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/lib/Target/AArch64
Chandler Carruth 98500f2974 [TTI] Make the cost APIs in TargetTransformInfo consistently use 'int'
rather than 'unsigned' for their costs.

For something like costs in particular there is a natural "negative"
value, that of savings or saved cost. As a consequence, there is a lot
of code that subtracts or creates negative values based on cost, all of
which is prone to awkwardness or bugs when dealing with an unsigned
type. Similarly, we *never* want these values to wrap, as that would
cause Very Bad code generation (likely percieved as an infinite loop as
we try to emit over 2^32 instructions or some such insanity).

All around 'int' seems a much better fit for these basic metrics. I've
added asserts to ensure that at least the TTI interface never returns
negative numbers here. If we ever have a use case for negative numbers,
we can remove this, but this way a bug where someone used '-1' to
produce a 'very large' cost will be caught by the assert.

This passes all tests, and is also UBSan clean.

No functional change intended.

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

llvm-svn: 244080
2015-08-05 18:08:10 +00:00
..
AsmParser [llvm-mc] Pushing plumbing through for --fatal-warnings flag. 2015-07-27 21:56:53 +00:00
Disassembler Change the last few internal StringRef triples into Triple objects. 2015-07-06 16:56:07 +00:00
InstPrinter Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MCTargetDesc MC: Remove MCSubtargetInfo() default constructor 2015-07-10 22:43:42 +00:00
TargetInfo
Utils [AArch64][v8.1a] The "pan" sysreg isn't MSR-specific. NFCI. 2015-08-04 00:55:11 +00:00
AArch64.h [AArch64] Revert r239711 again. We need to discuss how to share code between AArch64 and ARM backend. 2015-06-15 01:56:40 +00:00
AArch64.td [AArch64] Define subtarget feature strict-align. 2015-07-29 14:17:26 +00:00
AArch64A53Fix835769.cpp Use make_range(rbegin(), rend()) to allow foreach loops. NFC. 2015-07-24 21:13:43 +00:00
AArch64A57FPLoadBalancing.cpp MachineRegisterInfo: Remove UsedPhysReg infrastructure 2015-07-14 17:52:07 +00:00
AArch64AddressTypePromotion.cpp [AArch64] Make the naming of the Address Type Promotion pass consistent. 2015-08-05 15:32:23 +00:00
AArch64AdvSIMDScalarPass.cpp [AArch64] Register (existing) AArch64AdvSIMDScalar pass with LLVM pass manager. 2015-08-05 15:18:58 +00:00
AArch64AsmPrinter.cpp Clean up redundant copies of Triple objects. NFC 2015-06-16 15:44:21 +00:00
AArch64BranchRelaxation.cpp [AArch64] Register (existing) AArch64BranchRelaxation pass with LLVM pass manager. 2015-08-05 16:12:10 +00:00
AArch64CallingConvention.h Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
AArch64CallingConvention.td Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
AArch64CleanupLocalDynamicTLSPass.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
AArch64CollectLOH.cpp Make this less error prone by using a #define. NFC. 2015-08-05 14:48:44 +00:00
AArch64ConditionalCompares.cpp wrap OptSize and MinSize attributes for easier and consistent access (NFCI) 2015-08-04 15:49:57 +00:00
AArch64ConditionOptimizer.cpp AArch64: use AddressingModes.h accessors for compare shifts 2015-07-29 16:39:56 +00:00
AArch64DeadRegisterDefinitionsPass.cpp [AArch64] Register AArch64DeadRegisterDefinition pass with LLVM pass manager. 2015-08-05 17:35:34 +00:00
AArch64ExpandPseudoInsts.cpp [AArch64] Register (existing) AArch64ExpandPseudo pass with LLVM pass manager. 2015-08-05 14:22:53 +00:00
AArch64FastISel.cpp Move BB succ_iterator to be inside TerminatorInst. NFC. 2015-08-05 17:43:01 +00:00
AArch64FrameLowering.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
AArch64FrameLowering.h PrologEpilogInserter: Rewrite API to determine callee save regsiters. 2015-07-14 17:17:13 +00:00
AArch64InstrAtomics.td
AArch64InstrFormats.td [AArch64] Rename FP formats to be more consistent. NFC. 2015-08-04 01:38:08 +00:00
AArch64InstrInfo.cpp test commit, only added one space 2015-07-23 23:55:28 +00:00
AArch64InstrInfo.h name change: hasPattern() -> getMachineCombinerPatterns() ; NFC 2015-06-19 23:21:42 +00:00
AArch64InstrInfo.td [AArch64] Rename FP formats to be more consistent. NFC. 2015-08-04 01:38:08 +00:00
AArch64ISelDAGToDAG.cpp wrap OptSize and MinSize attributes for easier and consistent access (NFCI) 2015-08-04 15:49:57 +00:00
AArch64ISelLowering.cpp wrap OptSize and MinSize attributes for easier and consistent access (NFCI) 2015-08-04 15:49:57 +00:00
AArch64ISelLowering.h [AArch64] Define subtarget feature strict-align. 2015-07-29 14:17:26 +00:00
AArch64LoadStoreOptimizer.cpp [AArch64] Register (existing) AArch64LoadStoreOpt pass with LLVM pass manager. 2015-08-05 13:44:51 +00:00
AArch64MachineCombinerPattern.h
AArch64MachineFunctionInfo.h Fix typo "fuction" noticed in comments in AssumptionCache.h, and also all the other files that have the same typo. All comments, no functionality change! (Merely a "fuctionality" change.) 2015-07-29 22:32:47 +00:00
AArch64MCInstLower.cpp Convert some AArch64 code to foreach loops. NFC. 2015-08-03 19:04:32 +00:00
AArch64MCInstLower.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
AArch64PBQPRegAlloc.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
AArch64PBQPRegAlloc.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
AArch64PerfectShuffle.h
AArch64PromoteConstant.cpp Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used. 2015-03-23 19:32:43 +00:00
AArch64RegisterInfo.cpp [AArch64] Remove check for Darwin that was needed to decide if x18 should 2015-07-27 19:18:47 +00:00
AArch64RegisterInfo.h Targets: commonize some stack realignment code 2015-07-20 22:51:32 +00:00
AArch64RegisterInfo.td [AArch64] Add v8.1a atomic instructions 2015-06-02 10:58:41 +00:00
AArch64SchedA53.td
AArch64SchedA57.td [AArch64] Changes some SchedAlias to WriteRes for Cortex-A57. 2015-04-10 13:19:27 +00:00
AArch64SchedA57WriteRes.td
AArch64SchedCyclone.td
AArch64Schedule.td
AArch64SelectionDAGInfo.cpp Remove getDataLayout() from TargetSelectionDAGInfo (had no users) 2015-07-09 02:10:08 +00:00
AArch64SelectionDAGInfo.h Remove getDataLayout() from TargetSelectionDAGInfo (had no users) 2015-07-09 02:10:08 +00:00
AArch64StorePairSuppress.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
AArch64Subtarget.cpp [AArch64] Define subtarget feature strict-align. 2015-07-29 14:17:26 +00:00
AArch64Subtarget.h [AArch64] Define subtarget feature strict-align. 2015-07-29 14:17:26 +00:00
AArch64TargetMachine.cpp [AArch64] Lower interleaved memory accesses to ldN/stN intrinsics. This patch also adds a function to calculate the cost of interleaved memory accesses. 2015-06-26 02:32:07 +00:00
AArch64TargetMachine.h Replace string GNU Triples with llvm::Triple in TargetMachine. NFC. 2015-06-11 19:41:26 +00:00
AArch64TargetObjectFile.cpp MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +00:00
AArch64TargetObjectFile.h [AsmPrinter][TLOF] 32-bit MachO support for replacing GOT equivalents 2015-03-06 13:49:05 +00:00
AArch64TargetTransformInfo.cpp [TTI] Make the cost APIs in TargetTransformInfo consistently use 'int' 2015-08-05 18:08:10 +00:00
AArch64TargetTransformInfo.h [TTI] Make the cost APIs in TargetTransformInfo consistently use 'int' 2015-08-05 18:08:10 +00:00
CMakeLists.txt [AArch64] Revert r239711 again. We need to discuss how to share code between AArch64 and ARM backend. 2015-06-15 01:56:40 +00:00
LLVMBuild.txt Re-commit of r238201 with fix for building with shared libraries. 2015-06-01 12:02:47 +00:00
Makefile