1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

81 Commits

Author SHA1 Message Date
Rafael Espindola
a279462828 Remove several unused variables.
Patch by Alp Toker.

llvm-svn: 191757
2013-10-01 13:32:03 +00:00
Tobias Grosser
6e4ee527af Fix build by replacing '>>' with '> >'
llvm-svn: 186276
2013-07-14 06:12:01 +00:00
Craig Topper
58fa7a9b4a Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
llvm-svn: 186274
2013-07-14 04:42:23 +00:00
Chandler Carruth
4c1f3c24db Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

llvm-svn: 171366
2013-01-02 11:36:10 +00:00
Bill Wendling
e0920e4122 Remove the Function::getFnAttributes method in favor of using the AttributeSet
directly.

This is in preparation for removing the use of the 'Attribute' class as a
collection of attributes. That will shift to the AttributeSet class instead.

llvm-svn: 171253
2012-12-30 10:32:01 +00:00
Jakob Stoklund Olesen
203e10c066 Use MachineInstrBuilder in a few CodeGen passes.
This automatically passes a context pointer to MI->addOperand().

llvm-svn: 170711
2012-12-20 18:08:06 +00:00
Bill Wendling
56d9c4b832 Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
llvm-svn: 170502
2012-12-19 07:18:57 +00:00
Chandler Carruth
a490793037 Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

llvm-svn: 169131
2012-12-03 16:50:05 +00:00
Bill Wendling
b53357de39 Create enums for the different attributes.
We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.

llvm-svn: 165488
2012-10-09 07:45:08 +00:00
Bill Wendling
92f3ab845d Remove the `hasFnAttr' method from Function.
The hasFnAttr method has been replaced by querying the Attributes explicitly. No
intended functionality change.

llvm-svn: 164725
2012-09-26 21:48:26 +00:00
Benjamin Kramer
f21f7146a3 Stop leaking RegScavengers from TailDuplication.
llvm-svn: 158069
2012-06-06 13:53:41 +00:00
Evan Cheng
a46443d6db Teach taildup to update livein set. rdar://11538365
llvm-svn: 157663
2012-05-30 00:42:39 +00:00
Jakob Stoklund Olesen
12cd5a3007 Constrain register classes in TailDup.
When rewriting operands, make sure the new registers have a compatible
register class.

llvm-svn: 157163
2012-05-20 18:42:51 +00:00
Evan Cheng
499c67989a Make post-ra tail duplication bundle safe. No test case as recent codegen
flow changes have already hidden the bug. rdar://10893812

llvm-svn: 150949
2012-02-20 07:51:58 +00:00
Andrew Trick
b9d2e9e81d Codegen pass definition cleanup. No functionality.
Moving toward a uniform style of pass definition to allow easier target configuration.
Globally declare Pass ID.
Globally declare pass initializer.
Use INITIALIZE_PASS consistently.
Add a call to the initializer from CodeGen.cpp.
Remove redundant "createPass" functions and "getPassName" methods.

While cleaning up declarations, cleaned up comments (sorry for large diff).

llvm-svn: 150100
2012-02-08 21:23:13 +00:00
Andrew Trick
e696d2f01f Move pass configuration out of pass constructors: TailDuplicate::PreRegAlloc
llvm-svn: 150091
2012-02-08 21:22:30 +00:00
Evan Cheng
1acd685d87 Add bundle aware API for querying instruction properties and switch the code
generator to it. For non-bundle instructions, these behave exactly the same
as the MC layer API.

For properties like mayLoad / mayStore, look into the bundle and if any of the
bundled instructions has the property it would return true.
For properties like isPredicable, only return true if *all* of the bundled
instructions have the property.
For properties like canFoldAsLoad, isCompare, conservatively return false for
bundles.

llvm-svn: 146026
2011-12-07 07:15:52 +00:00
Evan Cheng
5061553f9d First chunk of MachineInstr bundle support.
1. Added opcode BUNDLE
2. Taught MachineInstr class to deal with bundled MIs
3. Changed MachineBasicBlock iterator to skip over bundled MIs; added an iterator to walk all the MIs
4. Taught MachineBasicBlock methods about bundled MIs

llvm-svn: 145975
2011-12-06 22:12:01 +00:00
Jakob Stoklund Olesen
f7f4398587 Trim an unneeded header.
llvm-svn: 137184
2011-08-09 23:49:21 +00:00
Rafael Espindola
962773db64 Move most of the pre BB code to TailDuplicateAndUpdate. Change the
HasIndirectbr variable to be just that. No functionality change.

llvm-svn: 134371
2011-07-04 01:21:42 +00:00
Rafael Espindola
ce4f4ff705 Reduce indentation and fix the count of how many PHIs we have inserted.
llvm-svn: 134370
2011-07-04 00:13:36 +00:00
Evan Cheng
4a169be530 - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and
sink them into MC layer.
- Added MCInstrInfo, which captures the tablegen generated static data. Chang
TargetInstrInfo so it's based off MCInstrInfo.

llvm-svn: 134021
2011-06-28 19:10:37 +00:00
Rafael Espindola
701cdf4f09 Simplify
llvm-svn: 133798
2011-06-24 15:50:56 +00:00
Rafael Espindola
b5901540ac Now that bb with phis are not considered simple, duplicate them even if
we cannot duplicate to every predecessor.

llvm-svn: 133797
2011-06-24 15:47:41 +00:00
Rafael Espindola
9876e7ae10 Simplify now that blocks with phis are not considered simple.
llvm-svn: 133793
2011-06-24 14:04:13 +00:00
Rafael Espindola
151ddd5335 Move more logic to shouldTailDuplicate and only duplicate regular bb before
register allocation if it has a indirectbr or if we can duplicate it to
every predecessor.

This fixes the SingleSource/Benchmarks/Shootout-C++/matrix.cpp regression but
keeps the previous improvements to sunspider.

llvm-svn: 133682
2011-06-23 03:41:29 +00:00
Rafael Espindola
e57d6977be Reenable tail duplication of bb with just an unconditional jump, but
don't remove blocks that have their address taken.

llvm-svn: 133659
2011-06-22 22:31:57 +00:00
Chad Rosier
5e6ecb23a4 Revert r133607. This is causing failures in the Clang gccTestSuite.
Specifically, gcc.c-torture/compile/pr21356.c.

llvm-svn: 133646
2011-06-22 21:13:23 +00:00
Rafael Espindola
9cc87c6608 Reenable the optimization added in 133415, but change the definition of a "simple" bb to
be one with only one unconditional branch and no phis. Duplicating the phis in this case
is possible, but requeres liveness analysis or breaking edges.

llvm-svn: 133607
2011-06-22 04:01:58 +00:00
Rafael Espindola
1c53a39ff9 Disable again.
llvm-svn: 133446
2011-06-20 17:04:08 +00:00
Rafael Espindola
a4e0983e26 Re enable 133415 with two fixes
* Don't introduce a duplicated bb in the CFG
* When making a branch unconditional, clear the PredCond array so that it
  is really unconditional.

llvm-svn: 133432
2011-06-20 14:11:42 +00:00
Duncan Sands
02396a97be Disable the logic added by rafael in commit 133415 to see if it brings the
dragonegg buildbots back to life.  Original commit message:
Teach early dup how to duplicate basic blocks with one successor and only phi instructions
into more complex blocks.

llvm-svn: 133430
2011-06-20 09:26:23 +00:00
Francois Pichet
fb2d44e57b Fix MSVC build. next() function already exists in the MSVC headers. This create a overload conflict. Make sure we pick up the llvm one.
llvm-svn: 133416
2011-06-20 05:19:37 +00:00
Rafael Espindola
ff05956b0b Teach early dup how to duplicate basic blocks with one successor and only phi instructions
into more complex blocks.

llvm-svn: 133415
2011-06-20 04:16:35 +00:00
Rafael Espindola
f9ff169e9c Two fixes relating to debug value:
* We should change the generated code because of a debug use.
* Avoid creating debug uses of undef, as they become a kill.
Test to follow.

llvm-svn: 133255
2011-06-17 13:59:43 +00:00
Rafael Espindola
7adb7e304b Enable early duplication of small blocks. There are still improvements to
be made, but this is already a win.

llvm-svn: 133240
2011-06-17 05:54:50 +00:00
Rafael Espindola
58fdae0c51 Removed tabs. Also fixed my editor...
llvm-svn: 132857
2011-06-10 21:01:53 +00:00
Rafael Espindola
d6a9a045e0 Remove duplicated test.
Thanks Bob Wilson for noticing it!

llvm-svn: 132851
2011-06-10 20:08:23 +00:00
Rafael Espindola
aabc17c8ca Make the optional verification step more strict.
llvm-svn: 132822
2011-06-09 23:55:56 +00:00
Rafael Espindola
f3a32b0e25 Avoid a gcc warning about multiline comments.
llvm-svn: 132821
2011-06-09 23:51:45 +00:00
Rafael Espindola
48351feabc On last fix to the early tail duplication.
With this I am able to bootstrap clang with early tail duplication enabled
for any small bb and setting tail-dup-size to a relatively large value(8) to
stress this code.

llvm-svn: 132816
2011-06-09 23:22:56 +00:00
Rafael Espindola
7993bc1353 Also consider phi nodes when deciding if a register is live out.
llvm-svn: 132814
2011-06-09 22:53:47 +00:00
Rafael Espindola
4b78a41c8c AnalyzeBranch modifies the bb, but we don't want to modify a bb with
eh edges. Swap the order of the checks to avoid it.

llvm-svn: 132806
2011-06-09 21:43:25 +00:00
Rafael Espindola
5fd95a9c94 A PHI in this basic block is a use in another basic block.
llvm-svn: 132805
2011-06-09 20:55:41 +00:00
Rafael Espindola
b39a7c9540 Refactor some checks into shouldTailDuplicate. Update comments.
No functionality change.

llvm-svn: 132798
2011-06-09 19:54:42 +00:00
Rafael Espindola
e987e93aa0 Fix count.
llvm-svn: 132749
2011-06-08 14:23:19 +00:00
Rafael Espindola
c96d74d84e Count how many phis we are creating.
llvm-svn: 132748
2011-06-08 14:13:31 +00:00
Evan Cheng
dda52de359 Update comments.
llvm-svn: 124843
2011-02-04 01:10:12 +00:00
Jakob Stoklund Olesen
430d0693dc Respect the -tail-dup-size command line option even when optimizing for size.
This is similar to the -unroll-threshold option. There should be no change in
behavior when -tail-dup-size is not explicit on the llc command line.

llvm-svn: 124564
2011-01-30 20:38:12 +00:00
Evan Cheng
4af5487b74 Re-apply r124518 with fix. Watch out for invalidated iterator.
llvm-svn: 124526
2011-01-29 04:46:23 +00:00