| #
70573dcd |
| 19-Nov-2014 |
David Blaikie <[email protected]> |
Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard library's associative container inse
Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard library's associative container insert function.
This lead to updating SmallSet::insert to return pair<iterator, bool>, and then to update SmallPtrSet::insert to return pair<iterator, bool>, and then to update all the existing users of those functions...
llvm-svn: 222334
show more ...
|
|
Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3 |
|
| #
abea99f6 |
| 13-Aug-2014 |
Quentin Colombet <[email protected]> |
[MachineDominatorTree] Provide a method to inform a MachineDominatorTree that a critical edge has been split. The MachineDominatorTree will when lazy update the underlying dominance properties when r
[MachineDominatorTree] Provide a method to inform a MachineDominatorTree that a critical edge has been split. The MachineDominatorTree will when lazy update the underlying dominance properties when require.
** Context **
This is a follow-up of r215410. Each time a critical edge is split this invalidates the dominator tree information. Thus, subsequent queries of that interface will be slow until the underlying information is actually recomputed (costly).
** Problem **
Prior to this patch, splitting a critical edge needed to query the dominator tree to update the dominator information. Therefore, splitting a bunch of critical edges will likely produce poor performance as each query to the dominator tree will use the slow query path. This happens a lot in passes like MachineSink and PHIElimination.
** Proposed Solution **
Splitting a critical edge is a local modification of the CFG. Moreover, as soon as a critical edge is split, it is not critical anymore and thus cannot be a candidate for critical edge splitting anymore. In other words, the predecessor and successor of a basic block inserted on a critical edge cannot be inserted by critical edge splitting.
Using these observations, we can pile up the splitting of critical edge and apply then at once before updating the DT information.
The core of this patch moves the update of the MachineDominatorTree information from MachineBasicBlock::SplitCriticalEdge to a lazy MachineDominatorTree.
** Performance **
Thanks to this patch, the motivating example compiles in 4- minutes instead of 6+ minutes. No test case added as the motivating example as nothing special but being huge!
The binaries are strictly identical for all the llvm test-suite + SPECs with and without this patch for both Os and O3.
Regarding compile time, I observed only noise, although on average I saw a small improvement.
<rdar://problem/17894619>
llvm-svn: 215576
show more ...
|
|
Revision tags: llvmorg-3.5.0-rc2 |
|
| #
fc6de428 |
| 05-Aug-2014 |
Eric Christopher <[email protected]> |
Have MachineFunction cache a pointer to the subtarget to make lookups shorter/easier and have the DAG use that to do the same lookup. This can be used in the future for TargetMachine based caching lo
Have MachineFunction cache a pointer to the subtarget to make lookups shorter/easier and have the DAG use that to do the same lookup. This can be used in the future for TargetMachine based caching lookups from the MachineFunction easily.
Update the MIPS subtarget switching machinery to update this pointer at the same time it runs.
llvm-svn: 214838
show more ...
|
| #
d913448b |
| 04-Aug-2014 |
Eric Christopher <[email protected]> |
Remove the TargetMachine forwards for TargetSubtargetInfo based information and update all callers. No functional change.
llvm-svn: 214781
|
|
Revision tags: llvmorg-3.5.0-rc1 |
|
| #
e9a5a503 |
| 02-Jul-2014 |
Matt Arsenault <[email protected]> |
Fix missing const
llvm-svn: 212168
|
|
Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2 |
|
| #
e96dd897 |
| 21-Apr-2014 |
Chandler Carruth <[email protected]> |
[Modules] Make Support/Debug.h modular. This requires it to not change behavior based on other files defining DEBUG_TYPE, which means it cannot define DEBUG_TYPE at all. This is actually better IMO a
[Modules] Make Support/Debug.h modular. This requires it to not change behavior based on other files defining DEBUG_TYPE, which means it cannot define DEBUG_TYPE at all. This is actually better IMO as it forces folks to define relevant DEBUG_TYPEs for their files. However, it requires all files that currently use DEBUG(...) to define a DEBUG_TYPE if they don't already. I've updated all such files in LLVM and will do the same for other upstream projects.
This still leaves one important change in how LLVM uses the DEBUG_TYPE macro going forward: we need to only define the macro *after* header files have been #include-ed. Previously, this wasn't possible because Debug.h required the macro to be pre-defined. This commit removes that. By defining DEBUG_TYPE after the includes two things are fixed:
- Header files that need to provide a DEBUG_TYPE for some inline code can do so by defining the macro before their inline code and undef-ing it afterward so the macro does not escape.
- We no longer have rampant ODR violations due to including headers with different DEBUG_TYPE definitions. This may be mostly an academic violation today, but with modules these types of violations are easy to check for and potentially very relevant.
Where necessary to suppor headers with DEBUG_TYPE, I have moved the definitions below the includes in this commit. I plan to move the rest of the DEBUG_TYPE macros in LLVM in subsequent commits; this one is big enough.
The comments in Debug.h, which were hilariously out of date already, have been updated to reflect the recommended practice going forward.
llvm-svn: 206822
show more ...
|
| #
c0196b1b |
| 14-Apr-2014 |
Craig Topper <[email protected]> |
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 206142
|
|
Revision tags: llvmorg-3.4.1-rc1 |
|
| #
b1f25f1b |
| 07-Mar-2014 |
Rafael Espindola <[email protected]> |
Replace PROLOG_LABEL with a new CFI_INSTRUCTION.
The old system was fairly convoluted: * A temporary label was created. * A single PROLOG_LABEL was created with it. * A few MCCFIInstructions were cr
Replace PROLOG_LABEL with a new CFI_INSTRUCTION.
The old system was fairly convoluted: * A temporary label was created. * A single PROLOG_LABEL was created with it. * A few MCCFIInstructions were created with the same label.
The semantics were that the cfi instructions were mapped to the PROLOG_LABEL via the temporary label. The output position was that of the PROLOG_LABEL. The temporary label itself was used only for doing the mapping.
The new CFI_INSTRUCTION has a 1:1 mapping to MCCFIInstructions and points to one by holding an index into the CFI instructions of this function.
I did consider removing MMI.getFrameInstructions completelly and having CFI_INSTRUCTION own a MCCFIInstruction, but MCCFIInstructions have non trivial constructors and destructors and are somewhat big, so the this setup is probably better.
The net result is that we don't create temporary labels that are never used.
llvm-svn: 203204
show more ...
|
| #
4b6845c7 |
| 04-Mar-2014 |
Chandler Carruth <[email protected]> |
[Modules] Move the LeakDetector header into the IR library where the source file had already been moved. Also move the unittest into the IR unittest library.
This may seem an odd thing to put in the
[Modules] Move the LeakDetector header into the IR library where the source file had already been moved. Also move the unittest into the IR unittest library.
This may seem an odd thing to put in the IR library but we only really use this with instructions and it needs the LLVM context to work, so it is intrinsically tied to the IR library.
llvm-svn: 202842
show more ...
|
| #
b6d0bd48 |
| 02-Mar-2014 |
Benjamin Kramer <[email protected]> |
[C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
Remove the old functions.
llvm-svn: 202636
|
| #
b681918d |
| 29-Jan-2014 |
Manman Ren <[email protected]> |
PGO branch weight: update edge weights in IfConverter.
This commit only handles IfConvertTriangle. To update edge weights of a successor, one interface is added to MachineBasicBlock: /// Set success
PGO branch weight: update edge weights in IfConverter.
This commit only handles IfConvertTriangle. To update edge weights of a successor, one interface is added to MachineBasicBlock: /// Set successor weight of a given iterator. setSuccWeight(succ_iterator I, uint32_t weight)
An existing testing case test/CodeGen/Thumb2/v8_IT_5.ll is updated, since we now correctly update the edge weights, the cold block is placed at the end of the function and we jump to the cold block.
llvm-svn: 200428
show more ...
|
| #
d48cdbf0 |
| 09-Jan-2014 |
Chandler Carruth <[email protected]> |
Put the functionality for printing a value to a raw_ostream as an operand into the Value interface just like the core print method is. That gives a more conistent organization to the IR printing inte
Put the functionality for printing a value to a raw_ostream as an operand into the Value interface just like the core print method is. That gives a more conistent organization to the IR printing interfaces -- they are all attached to the IR objects themselves. Also, update all the users.
This removes the 'Writer.h' header which contained only a single function declaration.
llvm-svn: 198836
show more ...
|
| #
9aca918d |
| 07-Jan-2014 |
Chandler Carruth <[email protected]> |
Move the LLVM IR asm writer header files into the IR directory, as they are part of the core IR library in order to support dumping and other basic functionality.
Rename the 'Assembly' include direc
Move the LLVM IR asm writer header files into the IR directory, as they are part of the core IR library in order to support dumping and other basic functionality.
Rename the 'Assembly' include directory to 'AsmParser' to match the library name and the only functionality left their -- printing has been in the core IR library for quite some time.
Update all of the #includes to match.
All of this started because I wanted to have the layering in good shape before I started adding support for printing LLVM IR using the new pass infrastructure, and commandline support for the new pass infrastructure.
llvm-svn: 198688
show more ...
|
| #
58873566 |
| 03-Jan-2014 |
Rafael Espindola <[email protected]> |
Make the llvm mangler depend only on DataLayout.
Before this patch any program that wanted to know the final symbol name of a GlobalValue had to link with Target.
This patch implements a compromise
Make the llvm mangler depend only on DataLayout.
Before this patch any program that wanted to know the final symbol name of a GlobalValue had to link with Target.
This patch implements a compromise solution where the mangler uses DataLayout. This way, any tool that already links with Target (llc, clang) gets the exact behavior as before and new IR files can be mangled without linking with Target.
With this patch the mangler is constructed with just a DataLayout and DataLayout is extended to include the information the Mangler needs.
llvm-svn: 198438
show more ...
|
|
Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3 |
|
| #
92b0a649 |
| 07-Dec-2013 |
Vincent Lejeune <[email protected]> |
Add a RequireStructuredCFG Field to TargetMachine.
llvm-svn: 196634
|
|
Revision tags: llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1 |
|
| #
13ddb7cd |
| 10-Oct-2013 |
Matthias Braun <[email protected]> |
Rename LiveRange to LiveInterval::Segment
The Segment struct contains a single interval; multiple instances of this struct are used to construct a live range, but the struct is not a live range by i
Rename LiveRange to LiveInterval::Segment
The Segment struct contains a single interval; multiple instances of this struct are used to construct a live range, but the struct is not a live range by itself.
llvm-svn: 192392
show more ...
|
|
Revision tags: llvmorg-3.3.1-rc1 |
|
| #
bbbb5326 |
| 04-Jul-2013 |
Jakob Stoklund Olesen <[email protected]> |
Live-in copies go *after* EH_LABELs.
This will soon be tested by exception handling working at all.
llvm-svn: 185615
|
| #
533c3bf2 |
| 03-Jul-2013 |
Jakob Stoklund Olesen <[email protected]> |
Add MachineBasicBlock::addLiveIn().
This function adds a live-in physical register to an MBB and ensures that it is copied to a virtual register immediately.
llvm-svn: 185594
|
| #
bc07a890 |
| 18-Jun-2013 |
Bill Wendling <[email protected]> |
Use pointers to the MCAsmInfo and MCRegInfo.
Someone may want to do something crazy, like replace these objects if they change or something.
No functionality change intended.
llvm-svn: 184175
|
|
Revision tags: llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1 |
|
| #
58b04b7e |
| 22-Apr-2013 |
Eli Bendersky <[email protected]> |
Optimize MachineBasicBlock::getSymbol by caching the symbol. Since the symbol name computation is expensive, this helps save about 25% of the time spent in this function.
llvm-svn: 180049
|
| #
24955967 |
| 17-Feb-2013 |
Cameron Zwarich <[email protected]> |
Remove use of reverse iterators in repairIntervalsInRange(). While they were arguably better than forward iterators for this use case, they are confusing and there are some implementation problems wi
Remove use of reverse iterators in repairIntervalsInRange(). While they were arguably better than forward iterators for this use case, they are confusing and there are some implementation problems with reverse iterators and MI bundles.
llvm-svn: 175393
show more ...
|
| #
ddeabf78 |
| 17-Feb-2013 |
Cameron Zwarich <[email protected]> |
Fix a conversion from a forward iterator to a reverse iterator in MachineBasicBlock::SplitCriticalEdge. Since this is an iterator rather than an instr_iterator, the isBundled() check only passes if g
Fix a conversion from a forward iterator to a reverse iterator in MachineBasicBlock::SplitCriticalEdge. Since this is an iterator rather than an instr_iterator, the isBundled() check only passes if getFirstTerminator() returned end() and the garbage memory happens to lean that way.
Multiple successors can be present without any terminator instructions in the case of exception handling with a fallthrough.
llvm-svn: 175383
show more ...
|
| #
bfebb419 |
| 17-Feb-2013 |
Cameron Zwarich <[email protected]> |
Add support for updating the LiveIntervals of registers used by 'exotic' terminators that actually have register uses when splitting critical edges.
This commit also introduces a method repairInterv
Add support for updating the LiveIntervals of registers used by 'exotic' terminators that actually have register uses when splitting critical edges.
This commit also introduces a method repairIntervalsInRange() on LiveIntervals, which allows for repairing LiveIntervals in a small range after an arbitrary target hook modifies, inserts, and removes instructions. It's pretty limited right now, but I hope to extend it to support all of the things that are done by the convertToThreeAddress() target hooks.
llvm-svn: 175382
show more ...
|
| #
cdcab38f |
| 12-Feb-2013 |
Cameron Zwarich <[email protected]> |
Add blocks to the LiveIntervalAnalysis RegMaskBlocks array when splitting a critical edge.
llvm-svn: 174936
|
| #
af34931c |
| 12-Feb-2013 |
Cameron Zwarich <[email protected]> |
Fix the updating of LiveIntervals after splitting a critical edge. PHI operand live ranges should always be extended, and the only successor that should be considered for extension of other ranges is
Fix the updating of LiveIntervals after splitting a critical edge. PHI operand live ranges should always be extended, and the only successor that should be considered for extension of other ranges is the target of the split edge.
llvm-svn: 174935
show more ...
|