1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

5271 Commits

Author SHA1 Message Date
Chris Lattner
ab3ae8dd2f add a way to make this less brittle
llvm-svn: 36528
2007-04-28 05:38:52 +00:00
Chris Lattner
0b40f6db6c represent indirect operands explicitly in inline asm strings.
llvm-svn: 36522
2007-04-28 01:02:58 +00:00
Chris Lattner
9bfe8f4517 add a GEP helper function
llvm-svn: 36515
2007-04-27 20:35:56 +00:00
Jeff Cohen
adae970e06 Fix prolific source of 'possible loss of data' warnings.
llvm-svn: 36507
2007-04-27 14:43:05 +00:00
Devang Patel
e7e2cb2826 Move ~Pass() from Pass.h into Pass.cpp
llvm-svn: 36498
2007-04-26 21:33:42 +00:00
Devang Patel
2becf3a0a4 Delete Analysis Resolver.
llvm-svn: 36493
2007-04-26 21:06:41 +00:00
Dan Gohman
bda4470e76 Fix a typo in a comment.
llvm-svn: 36485
2007-04-26 19:40:56 +00:00
Evan Cheng
eff332e3e1 Rename findRegisterUseOperand to findRegisterUseOperandIdx to avoid confusion.
llvm-svn: 36483
2007-04-26 19:00:32 +00:00
Jeff Cohen
34d6dc5574 Rename identifier that GCC uses as a macro, breaking llvm-gcc build.
llvm-svn: 36474
2007-04-26 15:07:47 +00:00
Chris Lattner
e1248f05f2 start defining codes for instructions
llvm-svn: 36471
2007-04-26 05:53:04 +00:00
Chris Lattner
4721ac3ee0 add a new code
llvm-svn: 36462
2007-04-26 03:26:26 +00:00
Chris Lattner
4a0785ffcd add alias support to bitcode
llvm-svn: 36460
2007-04-26 02:46:23 +00:00
Evan Cheng
cfa2a787f7 Be careful when to add implicit kill / dead operands. Don't add them during / post reg-allocation.
llvm-svn: 36458
2007-04-26 01:40:09 +00:00
Evan Cheng
132ea465a1 Change UsedPhysRegs from array bool to BitVector to save some space. Setting / getting its states now go through MachineFunction.
llvm-svn: 36451
2007-04-25 22:10:09 +00:00
Evan Cheng
e464e596a6 Data structure change to improve compile time (especially in debug mode).
llvm-svn: 36447
2007-04-25 19:34:00 +00:00
Devang Patel
6a358e5694 Mem2Reg does not need TargetData.
llvm-svn: 36446
2007-04-25 18:41:11 +00:00
Devang Patel
b6ef7bc5d9 Remove unused function argument.
llvm-svn: 36441
2007-04-25 17:15:20 +00:00
Anton Korobeynikov
d9de1e8852 Add missed file
llvm-svn: 36439
2007-04-25 16:42:39 +00:00
Anton Korobeynikov
25dc9a61cb Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
will follow.

llvm-svn: 36435
2007-04-25 14:27:10 +00:00
Evan Cheng
e884f9cb2a Fix for PR1306.
- A register def / use now implicitly affects sub-register liveness but does
not affect liveness information of super-registers.
- Def of a larger register (if followed by a use later) is treated as
read/mod/write of a smaller register.

llvm-svn: 36434
2007-04-25 07:30:23 +00:00
Evan Cheng
46096a692c Test if a register is sub- or super-register of another.
llvm-svn: 36433
2007-04-25 07:24:50 +00:00
Evan Cheng
7edd354721 Minor speed tweak.
llvm-svn: 36432
2007-04-25 07:24:13 +00:00
Chris Lattner
893d87cda5 support for >4G frames
llvm-svn: 36424
2007-04-25 04:29:06 +00:00
Chris Lattner
a2b590fff8 support > 4G stack objects
llvm-svn: 36422
2007-04-25 04:20:54 +00:00
Chris Lattner
4a45c98b6f allow 64-bit stack objects
llvm-svn: 36419
2007-04-25 04:07:31 +00:00
Bill Wendling
498c102df6 Add the final MMX instructions. Correct a few wrong patterns.
llvm-svn: 36405
2007-04-24 21:18:37 +00:00
Chris Lattner
61f8d0e81c comentate
llvm-svn: 36395
2007-04-24 15:54:42 +00:00
Chris Lattner
5ae162a9d2 add records for constant exprs
llvm-svn: 36393
2007-04-24 07:03:08 +00:00
Chris Lattner
ea07262cc5 add codes for constants table
llvm-svn: 36382
2007-04-23 23:29:59 +00:00
Christopher Lamb
872116a106 Fix bug in isFloatingPoint()
llvm-svn: 36381
2007-04-23 22:50:40 +00:00
Chris Lattner
b6ae31a101 add a missing operator
llvm-svn: 36375
2007-04-23 20:58:14 +00:00
Chris Lattner
8f45aa08fa Fix a bug in bitstream writer handling abbrevs, add value symtab
llvm-svn: 36373
2007-04-23 20:34:46 +00:00
Chris Lattner
193294e642 implement reading of abbrevs
llvm-svn: 36366
2007-04-23 18:57:58 +00:00
Chris Lattner
38568c7454 minor cleanups
llvm-svn: 36365
2007-04-23 18:57:32 +00:00
Chris Lattner
69a8eda44d finish implementation of basic abbrev writing.
llvm-svn: 36364
2007-04-23 17:43:52 +00:00
Chris Lattner
5510ac5a56 first part of implementation of abbrevs. The writer isn't fully there yet and the
reader doesn't handle them at all yet.

llvm-svn: 36363
2007-04-23 16:04:05 +00:00
Chris Lattner
1aa0ae26a8 promote this to being a public header.
llvm-svn: 36357
2007-04-23 01:01:15 +00:00
Christopher Lamb
a157874a8a PR400 phase 2. Propagate attributed load/store information through DAGs.
llvm-svn: 36356
2007-04-22 23:15:30 +00:00
Christopher Lamb
041ee2a78d PR400 phase 1 implementation feedback.
llvm-svn: 36354
2007-04-22 22:22:02 +00:00
Jeff Cohen
726786aa76 Have compiler enforce this.
llvm-svn: 36353
2007-04-22 22:16:55 +00:00
Christopher Lamb
5606cd66e2 PR400 work phase 1. Add attributed load/store instructions for volatile/align to LLVM.
llvm-svn: 36349
2007-04-22 19:24:39 +00:00
Jeff Cohen
577e8b8c63 Fix build problem with Gentoo 4.1.1-r3.
llvm-svn: 36348
2007-04-22 18:49:32 +00:00
Reid Spencer
4169952dab For PR1136:
Add reference counting to ParamAttrsList and make use of it in Function,
CallInst and InvokeInst classes.

llvm-svn: 36346
2007-04-22 17:28:03 +00:00
Reid Spencer
bcf9c262e7 Terminate with newline.
llvm-svn: 36345
2007-04-22 16:31:22 +00:00
Reid Spencer
5e886278ba Undo premature commit.
llvm-svn: 36344
2007-04-22 16:30:47 +00:00
Reid Spencer
f2bf7ece0f Terminate file with newline.
llvm-svn: 36343
2007-04-22 16:29:35 +00:00
Jeff Cohen
abe7ce99f0 Implement review feedback.
llvm-svn: 36342
2007-04-22 15:11:24 +00:00
Jeff Cohen
2cf2830f4d Teach Visual Studio about Bitcode.
llvm-svn: 36341
2007-04-22 15:00:52 +00:00
Chris Lattner
97852839f7 Define the content-independent interfaces to read/write bitcode files and
the high-level interface to read/write LLVM IR bitcode files.

This is a work in progress.

llvm-svn: 36329
2007-04-22 06:22:05 +00:00
Reid Spencer
4721577334 For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.

llvm-svn: 36327
2007-04-22 05:46:44 +00:00
Lauro Ramos Venancio
3b60b9546e X86 TLS: Implement review feedback.
llvm-svn: 36318
2007-04-21 20:56:26 +00:00
Reid Spencer
81070d52da Revert Christopher Lamb's load/store alignment changes.
llvm-svn: 36309
2007-04-21 18:36:27 +00:00
Jeff Cohen
5b012f8b7f Make enum-valued bitfield large enough to avoid interpretation as negative values in VC++.
llvm-svn: 36304
2007-04-21 16:29:37 +00:00
Jeff Cohen
facf6d55d3 Fix breakage of bytecode reader when built with VC++.
llvm-svn: 36303
2007-04-21 15:29:13 +00:00
Jeff Cohen
193124f5f1 The expression "SubclassData = (SubclassData & ~1) | (V) ? 1 : 0;" does not do what
was intended!  | has higher precedence than ?.  Caught by Visual Studio.

llvm-svn: 36302
2007-04-21 14:32:59 +00:00
Christopher Lamb
b56b6a7ad7 add support for alignment attributes on load/store instructions
llvm-svn: 36301
2007-04-21 08:16:25 +00:00
Owen Anderson
2767bc3188 Fix some null checks to actually test the part that needs checking.
llvm-svn: 36298
2007-04-21 07:04:45 +00:00
Evan Cheng
05a82b68e8 Add super-register set.
llvm-svn: 36295
2007-04-21 00:54:06 +00:00
Chris Lattner
4928ec0460 Fix a problem where primitive types lose their name after llvm_shutdown is called.
This also reduces the amount of work done at static construction time.

llvm-svn: 36285
2007-04-20 22:33:47 +00:00
Lauro Ramos Venancio
bc32d90b46 Implement "general dynamic", "initial exec" and "local exec" TLS models for
X86 32 bits.

llvm-svn: 36283
2007-04-20 21:38:10 +00:00
Evan Cheng
1835371d44 Add sub-registers set accessor.
llvm-svn: 36282
2007-04-20 21:28:05 +00:00
Evan Cheng
9ade37c2f1 Add sub-register sets.
llvm-svn: 36277
2007-04-20 21:11:22 +00:00
Owen Anderson
41b527b75f Move more passes to using ETForest instead of DominatorTree.
llvm-svn: 36271
2007-04-20 06:27:13 +00:00
Owen Anderson
e49ca2c78b Add null checks and const-ify these accessors.
llvm-svn: 36270
2007-04-20 05:44:16 +00:00
Chris Lattner
2ba953680f Fix a very strange assertion message, patch by Christopher Lamb
CVS: ----------------------------------------------------------------------

llvm-svn: 36267
2007-04-20 03:27:36 +00:00
Jeff Cohen
ac369daaa3 Fix some VC++ warnings.
llvm-svn: 36259
2007-04-19 02:04:09 +00:00
Owen Anderson
c08636e1f0 Add accessor to get the blocks immediately dominated by a given block to ETForest.
llvm-svn: 36251
2007-04-18 05:25:09 +00:00
Evan Cheng
fbbdb92c9d VarInfo::UsedBlocks is no longer used. Remove.
llvm-svn: 36250
2007-04-18 05:04:38 +00:00
Owen Anderson
7553394275 Add an accessor to make ETForest more useful.
llvm-svn: 36246
2007-04-18 04:38:39 +00:00
Evan Cheng
1325999a14 Don't populate TryAgainList when coalescing only physical registers with virtual registers.
llvm-svn: 36240
2007-04-18 02:30:19 +00:00
Chris Lattner
2411bc5af8 what's an & between friends?
llvm-svn: 36234
2007-04-18 00:43:05 +00:00
Evan Cheng
48352d7a71 Copy coalescing change to prevent a physical register from being pin to a
long live interval that has low usage density.
1. Change order of coalescing to join physical registers with virtual
   registers first before virtual register intervals become too long.
2. Check size and usage density to determine if it's worthwhile to join.
3. If joining is aborted, assign virtual register live interval allocation
   preference field to the physical register.
4. Register allocator should try to allocate to the preferred register
   first (if available) to create identify moves that can be eliminated.

llvm-svn: 36218
2007-04-17 20:32:26 +00:00
Evan Cheng
c5d2df366a Add a register allocation preference field; add a method to compute size of a live interval.
llvm-svn: 36216
2007-04-17 20:25:11 +00:00
Evan Cheng
023342b277 Change getAllocatableSet() so it returns allocatable registers for a specific register class.
llvm-svn: 36215
2007-04-17 20:23:34 +00:00
Evan Cheng
94e0223e55 Keep track of number of uses within the function per virtual register.
llvm-svn: 36214
2007-04-17 20:22:11 +00:00
Chris Lattner
4a83860eea Commit an patch from Gabor Greif in Mar 2005. This eliminates the tail
pointer from ilist, storing it in the prev pointer of the first node in the
list instead.

This shrinks ilist from 8 to 4 bytes, BasicBlock from 40->36 bytes, Function
from 76->68 bytes, Module from 52->44 bytes.

llvm-svn: 36210
2007-04-17 18:41:42 +00:00
Chris Lattner
77b13b351b make getnext/getprev accessors private.
llvm-svn: 36209
2007-04-17 18:30:41 +00:00
Chris Lattner
3bc0ec8776 make next/prev accessors private
llvm-svn: 36207
2007-04-17 18:16:39 +00:00
Chris Lattner
23ea4ce93b bool on darwin/ppc is 4 bytes.
llvm-svn: 36206
2007-04-17 18:15:04 +00:00
Chris Lattner
917d8832a1 Instruction:: Next/Prev accessors are now private
llvm-svn: 36204
2007-04-17 18:03:55 +00:00
Anton Korobeynikov
9bc4b792bf Implemented correct stack probing on mingw/cygwin for dynamic alloca's.
Also, fixed static case in presence of eax livin. This fixes PR331

PS: Why don't we still have push/pop instructions? :)
llvm-svn: 36195
2007-04-17 09:20:00 +00:00
Jeff Cohen
5780312029 Fix build breakage on 64-bit systems.
llvm-svn: 36193
2007-04-17 05:33:04 +00:00
Chris Lattner
db7de8e497 merge several fields in GlobalValue to use the same word, move CallingConv
field into SubclassData in Value.  This shrinks GlobalVAlue from 48->40
bytes, Function from 88->76, and GlobalVariable from 76->68.  This trims
4640 bytes off my testcase, reading a bc file without materializing any
functions.

llvm-svn: 36192
2007-04-17 04:31:29 +00:00
Chris Lattner
cc56e116fe The (negative) offset from a SymbolTableListTraits-using ilist to its container
object is always constant.  As such, evaluate it at compile time instead of storing
it as an ivar in SymbolTableListTraits.  This shrinks every SymbolTableListTraits
ilist by a word, shrinking BasicBlock from 44->40 bytes, Function from 96->88 bytes,
and Module from 60->52 bytes.

llvm-svn: 36189
2007-04-17 04:04:14 +00:00
Chris Lattner
71a21677f4 Refactor SymbolTableListTraits to only have a single pointer in it, instead
of two.  This shrinkifies Function by 8 bytes (104->96) and Module by 8
bytes (68->60).  On a testcase of mine, this reduces the memory used to
read a module header from 565680b to 561024, a little over 4K.

llvm-svn: 36188
2007-04-17 03:26:42 +00:00
Chris Lattner
3c118ffaf7 urr, yeah.
llvm-svn: 36187
2007-04-17 02:04:39 +00:00
Reid Spencer
e8cf6202ec Fix 80 col violations.
llvm-svn: 36168
2007-04-16 21:24:12 +00:00
Devang Patel
af0b4b4191 Proivde getAnalysis<FPAnalysis>(Func) support.
llvm-svn: 36159
2007-04-16 20:56:24 +00:00
Devang Patel
c1010840fa Give each pass manager chance to manage lower level analysis pass, which is
pass required by one of pass managed by the manager.

llvm-svn: 36153
2007-04-16 20:12:57 +00:00
Devang Patel
a76dce77d9 Add getPotentialPassManagerType(). No functionality change, yet.
llvm-svn: 36149
2007-04-16 18:51:25 +00:00
Anton Korobeynikov
f3e62a428a Removed tabs everywhere except autogenerated & external files. Add make
target for tabs checking.

llvm-svn: 36146
2007-04-16 18:10:23 +00:00
Reid Spencer
f12ab5a55b For PR1328:
Don't assert everytime an intrinsic name isn't recognized. Instead, make
the assert optional when callin getIntrinsicID(). This allows the assembler
to handle invalid intrinsic names gracefully.

llvm-svn: 36120
2007-04-16 06:54:34 +00:00
Owen Anderson
b371956400 Tabs -> Spaces
llvm-svn: 36094
2007-04-15 23:14:18 +00:00
Owen Anderson
ea857029ea Remove ImmediateDominator analysis. The same information can be obtained from DomTree. A lot of code for
constructing ImmediateDominator is now folded into DomTree construction.

This is part of the ongoing work for PR217.

llvm-svn: 36063
2007-04-15 08:47:27 +00:00
Owen Anderson
41582c8198 Make ETForest depend on DomTree rather than IDom. This is the first step
in the long process that will be fixing PR 217.

llvm-svn: 36034
2007-04-14 23:49:24 +00:00
Jeff Cohen
5a502fb622 Fix PR1329.
llvm-svn: 36016
2007-04-14 21:50:21 +00:00
Chris Lattner
5ed58fc4a9 add GetElementPtrInst::hasAllZeroIndices, a long-overdue helper method.
Writing it twice in the same day was too much for me.

llvm-svn: 35978
2007-04-14 00:12:57 +00:00
Reid Spencer
6e7854339e Implement a getBitsNeeded method to determine how many bits are needed to
represent a string in binary form by an APInt.

llvm-svn: 35968
2007-04-13 19:19:07 +00:00
Dan Gohman
2d4b1767ab Rename Value::getValueType to getValueID, to avoid confusion with
other things named getValueType.

llvm-svn: 35964
2007-04-13 18:12:09 +00:00
Chris Lattner
335f1cb1f8 CSE simple binary expressions when they are inserted. This makes LSR produce
less huge code that needs to be cleaned up by sdisel.

llvm-svn: 35959
2007-04-13 05:04:18 +00:00