Dan Gohman
daff5ec052
Remove forward-declarations for classes that don't exist.
...
llvm-svn: 36993
2007-05-11 21:05:57 +00:00
Dan Gohman
fbb784e6af
Add explicit keywords to several constructors that now have one argument.
...
llvm-svn: 36992
2007-05-11 21:04:48 +00:00
Dan Gohman
c272746f44
Simplify BranchInst::getSuccessor, avoiding a conditional operator.
...
llvm-svn: 36991
2007-05-11 20:59:29 +00:00
Anton Korobeynikov
96142de3f0
Allow multiple invokes per landing pad. This (probably) fixes PR1410.
...
llvm-svn: 36977
2007-05-10 22:34:59 +00:00
Evan Cheng
9e17872c1d
Eliminate MarkVirtRegAliveInBlock recursion.
...
llvm-svn: 36943
2007-05-08 19:00:00 +00:00
Evan Cheng
6c6cea91fc
Add MachineBasicBlock preds / succs reverse iterators.
...
llvm-svn: 36942
2007-05-08 18:55:03 +00:00
Chris Lattner
aba457b30b
update comments, no functionality change
...
llvm-svn: 36929
2007-05-08 05:38:32 +00:00
Jeff Cohen
b6e144cffe
Unbreak VC++ build.
...
llvm-svn: 36901
2007-05-07 15:21:46 +00:00
Chris Lattner
275757a05e
Enhance MemoryBuffer to return error messages in strings if they occur.
...
llvm-svn: 36899
2007-05-06 23:32:36 +00:00
Chris Lattner
dc5d7ed6a7
remove bytecode headers
...
llvm-svn: 36885
2007-05-06 19:47:36 +00:00
Chris Lattner
7c01ed123b
remove dead header
...
llvm-svn: 36884
2007-05-06 19:46:23 +00:00
Nick Lewycky
e7da2d6ac3
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Chris Lattner
c9c5d3eed8
Move this here from Bytecode/Archive.h
...
llvm-svn: 36865
2007-05-06 09:14:53 +00:00
Chris Lattner
4492f73eb4
allow zero-length arrays
...
llvm-svn: 36863
2007-05-06 08:22:10 +00:00
Chris Lattner
eb99789fef
we aren't at the end of stream until we've consumed all the bytes AND all
...
the bits in those bytes.
llvm-svn: 36861
2007-05-06 08:12:09 +00:00
Chris Lattner
963a255853
add support for identifying bitcode files
...
llvm-svn: 36845
2007-05-06 05:30:10 +00:00
Chris Lattner
7284541754
Add a helper that either opens a file or stdin.
...
llvm-svn: 36835
2007-05-06 04:41:59 +00:00
Jeff Cohen
53555de8f2
Make code more 64-bit aware.
...
llvm-svn: 36833
2007-05-06 03:24:19 +00:00
Jeff Cohen
b3f36d48c6
Unbreak VC++.
...
llvm-svn: 36831
2007-05-06 03:12:47 +00:00
Chris Lattner
7ef417107b
add a new CreateBitcodeWriterPass method, which creates a bitcode writer as
...
a pass
llvm-svn: 36828
2007-05-06 02:30:12 +00:00
Chris Lattner
19f599471c
add inline asm code
...
llvm-svn: 36826
2007-05-06 01:50:11 +00:00
Chris Lattner
251d0a3adb
Fix a subtle bug that prevented round-tripping 470.lbm
...
llvm-svn: 36825
2007-05-06 01:43:38 +00:00
Chris Lattner
f25f710c4d
add a denser encoding for null terminated strings, add a 6-bit abbrev as
...
well. This shrinks kc++ from 2724088 to 2717360 bytes.
llvm-svn: 36821
2007-05-06 00:53:07 +00:00
Chris Lattner
036d1bddf2
implement the 'string constant' optimization. This shrinks kc.bit from
...
2878544 to 2815788
llvm-svn: 36818
2007-05-06 00:35:24 +00:00
Chris Lattner
e7b015b2ed
fix a bug I introduced when I merged some code together
...
llvm-svn: 36813
2007-05-05 23:40:48 +00:00
Anton Korobeynikov
4db0090339
Emit sections/directives in the proper order. This fixes PR1376. Also,
...
some small cleanup was made.
llvm-svn: 36780
2007-05-05 09:04:50 +00:00
Chris Lattner
b0e7f54875
minor bugfix
...
llvm-svn: 36777
2007-05-05 07:20:34 +00:00
Chris Lattner
7dce4b04ca
add a 6-bit encoding type for strings.
...
llvm-svn: 36770
2007-05-05 01:15:42 +00:00
Chris Lattner
982ec1eddc
Implement support for globally associating abbrevs with block IDs, which
...
relieves us from having to emit the abbrevs into each instance of the block.
This shrinks kc.bit from 3368K to 3333K, but will be a more significant win
once instructions are abbreviated.
The VST went from:
Block ID #14 (VALUE_SYMTAB):
Num Instances: 2345
Total Size: 1.29508e+07b/1.61885e+06B/404713W
Average Size: 5522.73b/690.342B/172.585W
% of file: 48.0645
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 7035/3
Tot/Avg Records: 120924/51.5667
% Abbrev Recs: 100
to:
Block ID #14 (VALUE_SYMTAB):
Num Instances: 2345
Total Size: 1.26713e+07b/1.58391e+06B/395978W
Average Size: 5403.53b/675.442B/168.86W
% of file: 47.5198
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 0/0
Tot/Avg Records: 120924/51.5667
% Abbrev Recs: 100
because we didn't emit the same 3 abbrevs 2345 times :)
llvm-svn: 36767
2007-05-05 00:17:00 +00:00
Chris Lattner
0c7704f23c
use a template to eliminate manual code duplication
...
llvm-svn: 36757
2007-05-04 20:40:50 +00:00
Bill Wendling
e6182267d7
Add an "implies" field to features. This indicates that, if the current
...
feature is set, then the features in the implied list should be set also.
The opposite is also enforced: if a feature in the implied list isn't set,
then the feature that owns that implies list shouldn't be set either.
llvm-svn: 36756
2007-05-04 20:38:40 +00:00
Chris Lattner
5c71df1376
add support for array abbreviations.
...
llvm-svn: 36754
2007-05-04 20:33:47 +00:00
Chris Lattner
a49bfa6701
eliminate lengths from record bodies
...
llvm-svn: 36751
2007-05-04 19:10:48 +00:00
Chris Lattner
83e10c4e67
minor cleanups. Add provisions for a new standard BLOCKINFO_BLOCK
...
block type.
llvm-svn: 36748
2007-05-04 18:25:49 +00:00
Chris Lattner
fde2829347
refcount BitCodeAbbrev objects
...
llvm-svn: 36747
2007-05-04 17:35:19 +00:00
Chris Lattner
a919f6dddc
if functiontype is going to have a pointer to a paramattr object, it better
...
be const. The only way to get a pointer to these returns a const pointer.
llvm-svn: 36734
2007-05-04 03:39:28 +00:00
Chris Lattner
c97d08f702
add a helper
...
llvm-svn: 36729
2007-05-04 03:13:39 +00:00
Chris Lattner
302dc74536
remove unused code
...
llvm-svn: 36727
2007-05-04 03:01:46 +00:00
Chris Lattner
e796a9eec9
add new codes
...
llvm-svn: 36725
2007-05-04 03:00:00 +00:00
Chris Lattner
5a800309af
add a new code
...
llvm-svn: 36703
2007-05-03 22:16:11 +00:00
Jeff Cohen
ee7bf76342
Unbreak VC++ build.
...
llvm-svn: 36700
2007-05-03 22:09:21 +00:00
Devang Patel
2acc9769cc
Use iterative while loop instead of recursive function call.
...
llvm-svn: 36694
2007-05-03 20:55:18 +00:00
Dan Gohman
ac050d446b
Use the explicit keyword for the SCEV class' constructor.
...
llvm-svn: 36686
2007-05-03 18:45:06 +00:00
Chris Lattner
357882d27c
This is a patch to fix a compile error in STLExtras.h, and
...
a bug in GraphWriter.cpp.
Patch by Florian Brandner
llvm-svn: 36684
2007-05-03 18:32:10 +00:00
Chris Lattner
44e49e8665
remove extraneous type qualifiers
...
llvm-svn: 36679
2007-05-03 18:14:56 +00:00
Chris Lattner
2b8a4a624b
remove extraneous top-level semi's
...
llvm-svn: 36678
2007-05-03 18:13:15 +00:00
Chris Lattner
e33d087d1d
remove two useless functions. Just inherit Type's implementation instead.
...
llvm-svn: 36677
2007-05-03 17:10:20 +00:00
Chris Lattner
b86da5adbc
remove useless type qualifiers
...
llvm-svn: 36676
2007-05-03 17:09:36 +00:00
Chris Lattner
d0803d2e4e
avoid invalid C++ token in #error
...
llvm-svn: 36674
2007-05-03 16:57:26 +00:00
Devang Patel
8c78a0bff0
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Chris Lattner
6ac3a37fb6
Add a new option.
...
llvm-svn: 36657
2007-05-03 00:16:07 +00:00
Devang Patel
e95c6ad802
Use 'static const char' instead of 'static const int'.
...
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
0f88f76cfe
Re-install patch to enable use of PassID.
...
I am preparing another patch to address the failure that prompted
Chris to revert this patch earlier.
llvm-svn: 36649
2007-05-02 20:38:25 +00:00
Chris Lattner
7f716a937f
update to reflect reality
...
llvm-svn: 36643
2007-05-02 05:47:22 +00:00
Chris Lattner
11dfd35627
revert enough of devang's recent patches to get the tree basically working again
...
llvm-svn: 36638
2007-05-02 04:25:31 +00:00
Anton Korobeynikov
b538f67b1a
Fix couple of bugs connected with eh info:
...
1. Correct output offsets on Linux
2. Fix "style" of personality function. It shouldn't be indirect.
llvm-svn: 36633
2007-05-01 22:23:12 +00:00
Devang Patel
09f162ca6a
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Evan Cheng
61e237d6a5
Pass call frame setup SP adjustment along to eliminateFrameIndex().
...
llvm-svn: 36624
2007-05-01 08:59:18 +00:00
Evan Cheng
16827c38c4
Add SPAdj parameter to account for call frame setup SP adjustment.
...
llvm-svn: 36623
2007-05-01 08:58:27 +00:00
Nate Begeman
27a625a74b
llvm bug #1350 , parts 1, 2, and 3.
...
llvm-svn: 36618
2007-05-01 05:57:02 +00:00
Chris Lattner
81c7fc2783
several bitfixes to JumpToBit
...
llvm-svn: 36616
2007-05-01 05:51:32 +00:00
Chris Lattner
0f9f44a96d
add JumpToBit, an explicit init method, and a default ctor.
...
llvm-svn: 36613
2007-05-01 04:59:06 +00:00
Chris Lattner
20f0d2e290
add missing opcode.
...
llvm-svn: 36608
2007-05-01 02:12:05 +00:00
Evan Cheng
366feaed91
Added hook hasReservedCallFrame(). It returns true if the call frame is
...
included as part of the stack frame.
llvm-svn: 36606
2007-05-01 00:47:46 +00:00
Christopher Lamb
7c30c26fcb
Implement review feedback.
...
llvm-svn: 36603
2007-04-30 23:54:10 +00:00
Christopher Lamb
019064279e
Header file for ELF relocations.
...
llvm-svn: 36597
2007-04-30 20:41:08 +00:00
Anton Korobeynikov
16e2c5fec1
Fix comment
...
llvm-svn: 36596
2007-04-30 19:14:56 +00:00
Reid Spencer
8d4ff90680
If an archive is not recognized as an LLVM bytecode archive then declare
...
that it is native so that the linker will pass it on downstream. This avoids
a problem where the native link line fails because there is both a .so and
a .a file. The .a file gets processed as bytecode and then dropped from the
command line.
llvm-svn: 36584
2007-04-30 00:29:39 +00:00
Chris Lattner
84e376f669
add some helpers
...
llvm-svn: 36580
2007-04-29 21:49:05 +00:00
Chris Lattner
e2ea46d50b
compute this value correctly
...
llvm-svn: 36575
2007-04-29 19:49:58 +00:00
Dale Johannesen
1ee29dd026
Make ARM-specific version of getInlineAsmLength
...
llvm-svn: 36572
2007-04-29 19:17:45 +00:00
Chris Lattner
b9bf8a8daa
add a method
...
llvm-svn: 36571
2007-04-29 19:17:32 +00:00
Anton Korobeynikov
39f3cffbe3
Implement protected visibility. This partly implements PR1363. Linker
...
should be taught to deal with protected symbols.
llvm-svn: 36565
2007-04-29 18:35:00 +00:00
Anton Korobeynikov
546ea7ea88
Implement review feedback
...
llvm-svn: 36564
2007-04-29 18:02:48 +00:00
Chris Lattner
a05721d340
Jeff's fix was fine
...
llvm-svn: 36563
2007-04-29 17:44:10 +00:00
Chris Lattner
8f73e83c49
add missing ctor
...
llvm-svn: 36562
2007-04-29 17:40:50 +00:00
Jeff Cohen
990a58f242
Fix MemoryBuffer breakage correctly.
...
llvm-svn: 36561
2007-04-29 14:43:31 +00:00
Chris Lattner
fc4d7cd1ff
make this file self-contained
...
llvm-svn: 36555
2007-04-29 08:05:07 +00:00
Chris Lattner
6694f60bec
Switch the bitcode reader interface to take a MemoryBuffer instead of knowing
...
anything about disk I/O itself. This greatly simplifies its interface -
eliminating the need for the ReaderWrappers.cpp file.
This adds a new option to llvm-dis (-bitcode) which instructs it to read
the input file as bitcode. Until/unless the bytecode reader is taught to
read from MemoryBuffer, there is no way to handle stdin reading without it.
I don't plan to switch the bytecode reader over, I'd rather delete it :),
so the option will stay around temporarily.
llvm-svn: 36554
2007-04-29 07:54:31 +00:00
Chris Lattner
ee2d1f1ed2
Add a new memorybuffer class, to unify all the file reading code in the system
...
llvm-svn: 36553
2007-04-29 06:58:52 +00:00
Chris Lattner
084982501a
new method for creating a path, which does not create a temporary string.
...
llvm-svn: 36552
2007-04-29 06:16:32 +00:00
Anton Korobeynikov
b18f8f85e9
Implement review feedback. Aliasees can be either GlobalValue's or
...
bitcasts of them.
llvm-svn: 36537
2007-04-28 13:45:00 +00:00
Chris Lattner
f40a0a8b9f
add a default parameter
...
llvm-svn: 36529
2007-04-28 05:42:38 +00:00
Chris Lattner
19651c77b2
add a way to make this less brittle
...
llvm-svn: 36528
2007-04-28 05:38:52 +00:00
Chris Lattner
c48e2c3100
represent indirect operands explicitly in inline asm strings.
...
llvm-svn: 36522
2007-04-28 01:02:58 +00:00
Chris Lattner
2705829925
add a GEP helper function
...
llvm-svn: 36515
2007-04-27 20:35:56 +00:00
Jeff Cohen
6a23901014
Fix prolific source of 'possible loss of data' warnings.
...
llvm-svn: 36507
2007-04-27 14:43:05 +00:00
Devang Patel
2c1bba0c0c
Move ~Pass() from Pass.h into Pass.cpp
...
llvm-svn: 36498
2007-04-26 21:33:42 +00:00
Devang Patel
e6354bd3ff
Delete Analysis Resolver.
...
llvm-svn: 36493
2007-04-26 21:06:41 +00:00
Dan Gohman
e131e3ac02
Fix a typo in a comment.
...
llvm-svn: 36485
2007-04-26 19:40:56 +00:00
Evan Cheng
910c80851e
Rename findRegisterUseOperand to findRegisterUseOperandIdx to avoid confusion.
...
llvm-svn: 36483
2007-04-26 19:00:32 +00:00
Jeff Cohen
476db10261
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
1ceecb5df4
start defining codes for instructions
...
llvm-svn: 36471
2007-04-26 05:53:04 +00:00
Chris Lattner
ca3b44aa57
add a new code
...
llvm-svn: 36462
2007-04-26 03:26:26 +00:00
Chris Lattner
6337d7b7c7
add alias support to bitcode
...
llvm-svn: 36460
2007-04-26 02:46:23 +00:00
Evan Cheng
43a17fe826
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
d21968d11a
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
0fbe14ab87
Data structure change to improve compile time (especially in debug mode).
...
llvm-svn: 36447
2007-04-25 19:34:00 +00:00
Devang Patel
7f7b8985f8
Mem2Reg does not need TargetData.
...
llvm-svn: 36446
2007-04-25 18:41:11 +00:00
Devang Patel
073be55d8e
Remove unused function argument.
...
llvm-svn: 36441
2007-04-25 17:15:20 +00:00
Anton Korobeynikov
cb5b13a0b8
Add missed file
...
llvm-svn: 36439
2007-04-25 16:42:39 +00:00
Anton Korobeynikov
a97b694c82
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
7818c03c6b
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
93e3a2e6f7
Test if a register is sub- or super-register of another.
...
llvm-svn: 36433
2007-04-25 07:24:50 +00:00
Evan Cheng
559fae748c
Minor speed tweak.
...
llvm-svn: 36432
2007-04-25 07:24:13 +00:00
Chris Lattner
868d969081
support for >4G frames
...
llvm-svn: 36424
2007-04-25 04:29:06 +00:00
Chris Lattner
9bd98ea4c1
support > 4G stack objects
...
llvm-svn: 36422
2007-04-25 04:20:54 +00:00
Chris Lattner
7bf18ba0a2
allow 64-bit stack objects
...
llvm-svn: 36419
2007-04-25 04:07:31 +00:00
Bill Wendling
5c7f25632e
Add the final MMX instructions. Correct a few wrong patterns.
...
llvm-svn: 36405
2007-04-24 21:18:37 +00:00
Chris Lattner
a11d217c7a
comentate
...
llvm-svn: 36395
2007-04-24 15:54:42 +00:00
Chris Lattner
c6a993dc8c
add records for constant exprs
...
llvm-svn: 36393
2007-04-24 07:03:08 +00:00
Chris Lattner
82202333be
add codes for constants table
...
llvm-svn: 36382
2007-04-23 23:29:59 +00:00
Christopher Lamb
15ea59ddfc
Fix bug in isFloatingPoint()
...
llvm-svn: 36381
2007-04-23 22:50:40 +00:00
Chris Lattner
3e8d122a25
add a missing operator
...
llvm-svn: 36375
2007-04-23 20:58:14 +00:00
Chris Lattner
7abd70a4a9
Fix a bug in bitstream writer handling abbrevs, add value symtab
...
llvm-svn: 36373
2007-04-23 20:34:46 +00:00
Chris Lattner
1c927957f0
implement reading of abbrevs
...
llvm-svn: 36366
2007-04-23 18:57:58 +00:00
Chris Lattner
49ca73d7bc
minor cleanups
...
llvm-svn: 36365
2007-04-23 18:57:32 +00:00
Chris Lattner
9dd74dbe15
finish implementation of basic abbrev writing.
...
llvm-svn: 36364
2007-04-23 17:43:52 +00:00
Chris Lattner
4b00d92a09
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
b652b1346e
promote this to being a public header.
...
llvm-svn: 36357
2007-04-23 01:01:15 +00:00
Christopher Lamb
8af6d5896f
PR400 phase 2. Propagate attributed load/store information through DAGs.
...
llvm-svn: 36356
2007-04-22 23:15:30 +00:00
Christopher Lamb
f9206e267d
PR400 phase 1 implementation feedback.
...
llvm-svn: 36354
2007-04-22 22:22:02 +00:00
Jeff Cohen
af9a8a51a8
Have compiler enforce this.
...
llvm-svn: 36353
2007-04-22 22:16:55 +00:00
Christopher Lamb
8448570beb
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
33be4c78ef
Fix build problem with Gentoo 4.1.1-r3.
...
llvm-svn: 36348
2007-04-22 18:49:32 +00:00
Reid Spencer
c6a83847a2
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
380058025b
Terminate with newline.
...
llvm-svn: 36345
2007-04-22 16:31:22 +00:00
Reid Spencer
386837680f
Undo premature commit.
...
llvm-svn: 36344
2007-04-22 16:30:47 +00:00
Reid Spencer
d1906a945d
Terminate file with newline.
...
llvm-svn: 36343
2007-04-22 16:29:35 +00:00
Jeff Cohen
7368a611fb
Implement review feedback.
...
llvm-svn: 36342
2007-04-22 15:11:24 +00:00
Jeff Cohen
e7518d5dd7
Teach Visual Studio about Bitcode.
...
llvm-svn: 36341
2007-04-22 15:00:52 +00:00
Chris Lattner
eb9b37fd39
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
4388f0b4fa
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
4e91908f17
X86 TLS: Implement review feedback.
...
llvm-svn: 36318
2007-04-21 20:56:26 +00:00
Reid Spencer
0c1349e6bc
Revert Christopher Lamb's load/store alignment changes.
...
llvm-svn: 36309
2007-04-21 18:36:27 +00:00
Jeff Cohen
bef777f506
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
fa12f9d64a
Fix breakage of bytecode reader when built with VC++.
...
llvm-svn: 36303
2007-04-21 15:29:13 +00:00
Jeff Cohen
a30107fb03
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
bff50208c8
add support for alignment attributes on load/store instructions
...
llvm-svn: 36301
2007-04-21 08:16:25 +00:00
Owen Anderson
94e1d9aa39
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
951ed1bdd2
Add super-register set.
...
llvm-svn: 36295
2007-04-21 00:54:06 +00:00
Chris Lattner
d9d3a4bbd6
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
2518889872
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
3bf93733b9
Add sub-registers set accessor.
...
llvm-svn: 36282
2007-04-20 21:28:05 +00:00
Evan Cheng
da2bf2ce0a
Add sub-register sets.
...
llvm-svn: 36277
2007-04-20 21:11:22 +00:00
Owen Anderson
2da606c757
Move more passes to using ETForest instead of DominatorTree.
...
llvm-svn: 36271
2007-04-20 06:27:13 +00:00
Owen Anderson
7a5136d8c5
Add null checks and const-ify these accessors.
...
llvm-svn: 36270
2007-04-20 05:44:16 +00:00
Chris Lattner
bc43e8d0b3
Fix a very strange assertion message, patch by Christopher Lamb
...
CVS: ----------------------------------------------------------------------
llvm-svn: 36267
2007-04-20 03:27:36 +00:00
Jeff Cohen
8cd3f3d7b4
Fix some VC++ warnings.
...
llvm-svn: 36259
2007-04-19 02:04:09 +00:00
Owen Anderson
9749c4744e
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
4c53d321aa
VarInfo::UsedBlocks is no longer used. Remove.
...
llvm-svn: 36250
2007-04-18 05:04:38 +00:00
Owen Anderson
fae86bcbaa
Add an accessor to make ETForest more useful.
...
llvm-svn: 36246
2007-04-18 04:38:39 +00:00
Evan Cheng
b408e8f11d
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
0d7265650d
what's an & between friends?
...
llvm-svn: 36234
2007-04-18 00:43:05 +00:00
Evan Cheng
b881bdabd9
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
57b5214d59
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
2f45bf31c5
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
8387cf1100
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
51109b7830
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
ceb4b20807
make getnext/getprev accessors private.
...
llvm-svn: 36209
2007-04-17 18:30:41 +00:00
Chris Lattner
4a1e0b8c3e
make next/prev accessors private
...
llvm-svn: 36207
2007-04-17 18:16:39 +00:00
Chris Lattner
d1721d2e50
bool on darwin/ppc is 4 bytes.
...
llvm-svn: 36206
2007-04-17 18:15:04 +00:00
Chris Lattner
b0aebc208c
Instruction:: Next/Prev accessors are now private
...
llvm-svn: 36204
2007-04-17 18:03:55 +00:00
Anton Korobeynikov
8b7aab009e
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
38be56ddf5
Fix build breakage on 64-bit systems.
...
llvm-svn: 36193
2007-04-17 05:33:04 +00:00
Chris Lattner
3c2ff10b93
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
422cfcdcb3
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
b47aa543bb
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
0ed36f4078
urr, yeah.
...
llvm-svn: 36187
2007-04-17 02:04:39 +00:00
Reid Spencer
654b96df8b
Fix 80 col violations.
...
llvm-svn: 36168
2007-04-16 21:24:12 +00:00
Devang Patel
9294281ac1
Proivde getAnalysis<FPAnalysis>(Func) support.
...
llvm-svn: 36159
2007-04-16 20:56:24 +00:00
Devang Patel
e64d30573f
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
254c9eb7c8
Add getPotentialPassManagerType(). No functionality change, yet.
...
llvm-svn: 36149
2007-04-16 18:51:25 +00:00
Anton Korobeynikov
fb80151c42
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
9c2eec377e
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
f064c92298
Tabs -> Spaces
...
llvm-svn: 36094
2007-04-15 23:14:18 +00:00
Owen Anderson
f35a1dbc7a
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
78cecc817f
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
e7ce8f23f6
Fix PR1329.
...
llvm-svn: 36016
2007-04-14 21:50:21 +00:00
Chris Lattner
45f15572f7
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
9329e7b626
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
a789d31517
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
e71f1447f7
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
Lauro Ramos Venancio
749e4668e7
Implement the "thread_local" keyword.
...
llvm-svn: 35950
2007-04-12 18:32:50 +00:00
Reid Spencer
c6251a7dfd
For PR1284:
...
Implement the "part_set" intrinsic.
llvm-svn: 35938
2007-04-12 02:48:46 +00:00
Chris Lattner
af039c53c0
improve the patch for PR1318 to also support grouped options with custom
...
handlers (like the pass list). My previous fix only supported *new* command
line options, not additions to old ones.
This fixes test/Feature/load_module.ll
llvm-svn: 35935
2007-04-12 00:36:29 +00:00
Reid Spencer
a472f66dd0
For PR1146:
...
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.
llvm-svn: 35877
2007-04-11 02:44:20 +00:00
Reid Spencer
d3f622e0d5
Teach sys::Path how to recognize different kinds of object files for ELF
...
and Mach-O systems. Additionally, correct the Mach-O logic code to look at
byte 12 not byte 15. Hopefully this fixes the llvm-ld warning on Darwin.
llvm-svn: 35876
2007-04-11 02:02:09 +00:00
Bill Wendling
f099841573
Add support for our first SSSE3 instruction "pmulhrsw".
...
llvm-svn: 35869
2007-04-10 22:10:25 +00:00
Chris Lattner
b05e1727ef
fix a comment bug Reid noticed
...
llvm-svn: 35864
2007-04-10 16:33:06 +00:00
Chris Lattner
2cc9c488e8
add missing methods, mark stuff const
...
llvm-svn: 35862
2007-04-10 07:06:21 +00:00
Chris Lattner
338bd30f19
getLimitedValue now just forward to APInt's getLimitedValue. Mark it const.
...
llvm-svn: 35861
2007-04-10 06:44:12 +00:00
Chris Lattner
c43883c8a9
add a method
...
llvm-svn: 35860
2007-04-10 06:43:18 +00:00
Reid Spencer
782ae66e41
Drop the "bit" prefix for the part.select intrinsic.
...
llvm-svn: 35854
2007-04-10 02:52:46 +00:00
Chris Lattner
35f0417ec1
remove dead target hooks.
...
llvm-svn: 35847
2007-04-09 23:34:08 +00:00
Chris Lattner
39f65335d5
remove some dead target hooks, subsumed by isLegalAddressingMode
...
llvm-svn: 35840
2007-04-09 22:27:04 +00:00
Chris Lattner
288c994403
add a default ctor for AddrMode.
...
llvm-svn: 35832
2007-04-09 21:18:34 +00:00
Reid Spencer
ce38beb6a4
For PR1146:
...
* Add ParamAttrs to InvokeInst class too.
* Make sure all initializes of ParamAttrs in CallInst and InvokeInst are 0
* Destruct the ParamAttrs in Call/Invoke destructors to avoid memory
leaks. This will change when ParamAttrsList is uniquified but needs to
be correct until then.
llvm-svn: 35824
2007-04-09 18:00:57 +00:00
Reid Spencer
019c8869ed
For PR1146:
...
* Add ParamAttrList pointers to Function and CallInst.
* Move the implementation of ParamAttrList from Type.cpp to Function.cpp
llvm-svn: 35818
2007-04-09 15:01:12 +00:00
Anton Korobeynikov
506eaf7915
Next stage into switch lowering refactoring
...
1. Fix some bugs in the jump table lowering threshold
2. Implement much better metric for optimal pivot selection
3. Tune thresholds for different lowering methods
4. Implement shift-and trick for lowering small (<machine word
length) cases with few destinations. Good testcase will follow.
llvm-svn: 35816
2007-04-09 12:31:58 +00:00