1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/lib
Cong Hou 7f73476be8 Create a new interface addSuccessorWithoutWeight(MBB*) in MBB to add successors when optimization is disabled.
When optimization is disabled, edge weights that are stored in MBB won't be used so that we don't have to store them. Currently, this is done by adding successors with default weight 0, and if all successors have default weights, the weight list will be empty. But that the weight list is empty doesn't mean disabled optimization (as is stated several times in MachineBasicBlock.cpp): it may also mean all successors just have default weights.

We should discourage using default weights when adding successors, because it is very easy for users to forget update the correct edge weights instead of using default ones (one exception is that the MBB only has one successor). In order to detect such usages, it is better to differentiate using default weights from the case when optimizations is disabled.

In this patch, a new interface addSuccessorWithoutWeight(MBB*) is created for when optimization is disabled. In this case, MBB will try to maintain an empty weight list, but it cannot guarantee this as for many uses of addSuccessor() whether optimization is disabled or not is not checked. But it can guarantee that if optimization is enabled, then the weight list always has the same size of the successor list.

Differential revision: http://reviews.llvm.org/D13963

llvm-svn: 251429
2015-10-27 17:59:36 +00:00
..
Analysis [ScalarEvolutionExpander] Properly insert no-op casts + EH Pads 2015-10-27 07:36:42 +00:00
AsmParser AsmParser: Remove implicit ilist iterator conversions, NFC 2015-10-20 01:12:49 +00:00
Bitcode Use Twin instead of std::to_string. 2015-10-26 22:37:36 +00:00
CodeGen Create a new interface addSuccessorWithoutWeight(MBB*) in MBB to add successors when optimization is disabled. 2015-10-27 17:59:36 +00:00
DebugInfo [LLVMSymbolize] Don't use LLVMSymbolizer::Options in ModuleInfo. NFC. 2015-10-26 22:34:56 +00:00
ExecutionEngine [Orc] Add license header to OrcTargetSupport. 2015-10-26 06:40:28 +00:00
Fuzzer [libFuzzer] add -merge flag to merge corpora 2015-10-24 01:16:40 +00:00
IR [SCEV] Opportunistically interpret unsigned constraints as signed 2015-10-22 19:57:34 +00:00
IRReader Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC. 2015-06-16 22:27:55 +00:00
LibDriver [Option] Use an ArrayRef to store the Option Infos in OptTable. NFC 2015-10-21 16:30:42 +00:00
LineEditor
Linker Linker: Remove implicit ilist iterator conversion, NFC 2015-10-19 22:23:36 +00:00
LTO Reapply "LTO: Disable extra verify runs in release builds" 2015-09-15 23:05:59 +00:00
MC [ms-inline-asm] Leave alignment in bytes if the native assembler uses bytes 2015-10-27 17:32:48 +00:00
Object [AVR] Add ELF constants to headers 2015-10-23 06:05:55 +00:00
Option [Option] Use an ArrayRef to store the Option Infos in OptTable. NFC 2015-10-21 16:30:42 +00:00
Passes [PM] Port SROA to the new pass manager. 2015-09-12 09:09:14 +00:00
ProfileData Add helper functions and remove hard coded references to instProf related name/name-prefixes 2015-10-22 20:32:12 +00:00
Support [X86] Make elfiamcu an OS, not an environment. 2015-10-27 07:23:59 +00:00
TableGen [TblGen] ArrayRefize TGParser. No functional change intended. 2015-10-24 12:46:45 +00:00
Target Create a new interface addSuccessorWithoutWeight(MBB*) in MBB to add successors when optimization is disabled. 2015-10-27 17:59:36 +00:00
Transforms [SLP] Be more aggressive about reduction width selection. 2015-10-27 17:59:03 +00:00
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00