Dan Gohman
c120612daa
Give MachineFunctionAnalysis a destructor so it can verify that
...
that it released its allocated memory.
llvm-svn: 77775
2009-08-01 04:19:43 +00:00
Ted Kremenek
13710adad9
Make default ctor for ImmutableSet::iterator public.
...
llvm-svn: 77762
2009-08-01 01:28:23 +00:00
Owen Anderson
c8c302644c
Privatize all but one of the remaining constant tables.
...
llvm-svn: 77748
2009-07-31 22:45:43 +00:00
Mikhail Glushenkov
645bb0fc71
Add a warning.
...
llvm-svn: 77746
2009-07-31 22:24:20 +00:00
David Greene
81bcae5fda
Simplify operand padding by keying off tabs in the asm stream. If
...
padding is disabled, tabs get replaced by spaces except in the case of
the first operand, where the tab is output to line up the operands after
the mnemonics.
Add some better comments and eliminate redundant code.
Fix some testcases to not assume tabs.
llvm-svn: 77740
2009-07-31 21:57:10 +00:00
Daniel Dunbar
9ee33ca28e
llvm-mc: Support quoted identifiers.
...
- Uses MCAsmToken::getIdentifier which returns the (sub)string representing the
meaningfull contents a string or identifier token.
- Directives aren't done yet.
llvm-svn: 77739
2009-07-31 21:55:09 +00:00
Chris Lattner
63779b8d57
PreferredEHDataFormat is always call with data and global, but this whole
...
thing is #if0'd out anyway. Just simplify the code by reducing the interface.
Not deleting this is essential for Bill's continuing happiness.
llvm-svn: 77736
2009-07-31 21:39:55 +00:00
Owen Anderson
0087fe6e5c
Move the metadata constructors back to 2.5 syntax.
...
llvm-svn: 77733
2009-07-31 21:35:40 +00:00
Chris Lattner
d25701c114
move emitUsedDirectiveFor to TargetLoweringObjectFile and rename it to
...
indicate that it is a predicate, not an emitter. This eliminates TAI
dependencies on Mangler and GlobalValue.
llvm-svn: 77726
2009-07-31 20:52:39 +00:00
Owen Anderson
5a1acd9912
Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
...
metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Dan Gohman
01ea674c5b
Fix a typo in a comment.
...
llvm-svn: 77715
2009-07-31 19:26:54 +00:00
Dan Gohman
ed4f2350cb
Delete spurious semicolons.
...
llvm-svn: 77712
2009-07-31 18:59:29 +00:00
Benjamin Kramer
626495a031
Fix build.
...
llvm-svn: 77711
2009-07-31 18:58:46 +00:00
Chris Lattner
4d2c0f9008
switch off of 'Section' onto MCSection. We're not properly using
...
MCSection subclasses yet, but this is a step in the right direction.
llvm-svn: 77708
2009-07-31 18:48:30 +00:00
Dan Gohman
060ca138e2
Remove Annotation.h, which is no longer used in the LLVM tree.
...
llvm-svn: 77706
2009-07-31 18:36:25 +00:00
Dan Gohman
7baae4b355
MachineFunction no longer needs Annotation.
...
llvm-svn: 77704
2009-07-31 18:35:51 +00:00
Dan Gohman
dc2b1b0a1c
Fix some problems with ASTCallbackVH in its use as a DenseMap key.
...
llvm-svn: 77696
2009-07-31 18:21:48 +00:00
Dan Gohman
0542060b8a
Teach ValueHandleBase to treat DenseMap's special Empty and Tombstone
...
values the same way it treats null pointers. This is needed to allow
CallbackVH to be used as a key in a DenseMap.
llvm-svn: 77695
2009-07-31 18:20:18 +00:00
Devang Patel
9d7de2a155
Process DbgDeclareInst.
...
llvm-svn: 77694
2009-07-31 18:18:52 +00:00
Dan Gohman
40f830d08c
Split DenseMapInfo into a separate header file, so that it can be
...
included separately.
llvm-svn: 77693
2009-07-31 18:18:19 +00:00
Dan Gohman
5ea74d55ce
Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsage
...
shouldn't do AU.setPreservesCFG(), because even though CodeGen passes
don't modify the LLVM IR CFG, they may modify the MachineFunction CFG,
and passes like MachineLoop are registered with isCFGOnly set to true.
llvm-svn: 77691
2009-07-31 18:16:33 +00:00
Chris Lattner
51d5b43cda
refactor section construction in TLOF to be through an explicit
...
initialize method, which can be called when an MCContext is available.
llvm-svn: 77687
2009-07-31 17:42:42 +00:00
Owen Anderson
23a204d91b
Move getTrue() and getFalse() to 2.5-like APIs.
...
llvm-svn: 77685
2009-07-31 17:39:07 +00:00
Chris Lattner
c10132aa79
split MCSection stuff out to its own .cpp file, add a new
...
MCSectionWithKind subclass of MCSection.
llvm-svn: 77684
2009-07-31 17:02:00 +00:00
Chris Lattner
f0b4bf55f0
move the sectionkind and section classes to TargetLoweringObjectFile.h
...
llvm-svn: 77681
2009-07-31 16:47:16 +00:00
Chris Lattner
b37f29b6f3
create sections with MCSection::Create instead of Context->getOrCreateSection.
...
This is needed to allow polymorphic sections.
llvm-svn: 77680
2009-07-31 16:43:49 +00:00
Daniel Dunbar
5434756585
Revert r77654, it appears to be causing llvm-gcc bootstrap failures, and many
...
failures when building assorted projects with clang.
--- Reverse-merging r77654 into '.':
U include/llvm/CodeGen/Passes.h
U include/llvm/CodeGen/MachineFunctionPass.h
U include/llvm/CodeGen/MachineFunction.h
U include/llvm/CodeGen/LazyLiveness.h
U include/llvm/CodeGen/SelectionDAGISel.h
D include/llvm/CodeGen/MachineFunctionAnalysis.h
U include/llvm/Function.h
U lib/Target/CellSPU/SPUISelDAGToDAG.cpp
U lib/Target/PowerPC/PPCISelDAGToDAG.cpp
U lib/CodeGen/LLVMTargetMachine.cpp
U lib/CodeGen/MachineVerifier.cpp
U lib/CodeGen/MachineFunction.cpp
U lib/CodeGen/PrologEpilogInserter.cpp
U lib/CodeGen/MachineLoopInfo.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
D lib/CodeGen/MachineFunctionAnalysis.cpp
D lib/CodeGen/MachineFunctionPass.cpp
U lib/CodeGen/LiveVariables.cpp
llvm-svn: 77661
2009-07-31 03:02:41 +00:00
Dan Gohman
bcb44baa57
Manage MachineFunctions with an analysis Pass instead of the Annotable
...
mechanism. To support this, make MachineFunctionPass a little more
complete.
llvm-svn: 77654
2009-07-31 01:52:50 +00:00
Devang Patel
98250795e8
Add getOrInsertNamedMetadata().
...
llvm-svn: 77646
2009-07-30 23:59:04 +00:00
Devang Patel
d8db5e6a97
Add addElement().
...
llvm-svn: 77645
2009-07-30 23:57:23 +00:00
Lang Hames
16f58557d2
Removed the BigBlock register allocator.
...
llvm-svn: 77640
2009-07-30 23:18:43 +00:00
Owen Anderson
b292b8ce70
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Daniel Dunbar
a91dd9bf5f
Twine: Directly support int, long, and long long types.
...
- This should resolve Cygwin gcc ambiguities.
llvm-svn: 77624
2009-07-30 21:15:14 +00:00
Dan Gohman
f4362da1b7
Use CallbackVH in AliasSetTracker to avoid getting stuck with
...
dangling Value*s.
llvm-svn: 77623
2009-07-30 20:21:41 +00:00
Devang Patel
57eae13c8d
Fix MetadataBase::classof().
...
Thanks Benjamin Kramer!
llvm-svn: 77618
2009-07-30 18:45:09 +00:00
Daniel Dunbar
bd8556e0fb
Twine: Use raw_ostream::write_hex, remove unused itohexstr method.
...
llvm-svn: 77617
2009-07-30 18:30:19 +00:00
Devang Patel
3b4e827f2b
s/DebugInfoEnumerator/DebugInfoFinder/g
...
llvm-svn: 77615
2009-07-30 18:25:15 +00:00
Daniel Dunbar
6c9629b92a
Add raw_ostream::write_hex
...
llvm-svn: 77614
2009-07-30 18:21:23 +00:00
Daniel Dunbar
4d6aa73d6b
Remove itohexstr, which only had one user.
...
llvm-svn: 77613
2009-07-30 18:18:54 +00:00
Daniel Dunbar
132f78395a
Twines: Don't allow implicit conversion from integers, this is too tricky.
...
llvm-svn: 77605
2009-07-30 17:37:43 +00:00
Devang Patel
5262314b8d
walk DbgRegionStartInst and DbgRegionEndInst
...
llvm-svn: 77604
2009-07-30 17:30:23 +00:00
Devang Patel
6d39426d68
Fix comment.
...
llvm-svn: 77603
2009-07-30 17:25:33 +00:00
Sanjiv Gupta
a53e686d96
Allow targets to define libcall names for mem(cpy,set,move) intrinsics, rather than hardcoding them in DAG lowering.
...
llvm-svn: 77586
2009-07-30 09:12:56 +00:00
Evan Cheng
f7ce11cf71
I've changed the semantics of MERGE_VALUES a bit. It's now allowed to live until scheduling. It's deleted when the scheduler translate DAG nodes to machine instructions.
...
This is currently used by X86 to handle atomic_load_add when the output of the node is not used. I believe there is a better solution. But I find MERGE_VALUES useful for selecting multi-output node when the dead output can be selected as a IMPLICIT_DEF.
llvm-svn: 77583
2009-07-30 08:44:08 +00:00
Daniel Dunbar
e8b3236284
Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
...
explicitly.
llvm-svn: 77576
2009-07-30 03:47:15 +00:00
Devang Patel
847fcacd48
Check null NameMDNode elements.
...
llvm-svn: 77559
2009-07-30 01:02:04 +00:00
Devang Patel
27c87fff7f
Read and write NamedMDNode.
...
llvm-svn: 77517
2009-07-29 22:34:41 +00:00
Owen Anderson
4056ca9568
Move types back to the 2.5 API.
...
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Devang Patel
4a942d0863
There is no need to keep name ref in NamedMDNode.
...
llvm-svn: 77511
2009-07-29 21:58:56 +00:00
Chris Lattner
7667332899
inline the global 'getInstrOperandRegClass' function into its callers
...
now that TargetOperandInfo does the heavy lifting.
llvm-svn: 77508
2009-07-29 21:36:49 +00:00
Chris Lattner
f3239532cc
1. Introduce a new TargetOperandInfo::getRegClass() helper method
...
and convert code to using it, instead of having lots of things
poke the isLookupPtrRegClass() method directly.
2. Make PointerLikeRegClass contain a 'kind' int, and store it in
the existing regclass field of TargetOperandInfo when the
isLookupPtrRegClass() predicate is set. Make getRegClass pass
this into TargetRegisterInfo::getPointerRegClass(), allowing
targets to have multiple ptr_rc things.
llvm-svn: 77504
2009-07-29 21:10:12 +00:00
Chris Lattner
426bc7c0ae
make ptr_rc derive from a new PointerLikeRegClass tblgen class.
...
llvm-svn: 77503
2009-07-29 20:43:05 +00:00
Chris Lattner
ee68a483ec
Give getPointerRegClass() a "kind" value so that targets can
...
support multiple different pointer register classes.
llvm-svn: 77501
2009-07-29 20:31:52 +00:00
Owen Anderson
487375e9a2
Move ConstantExpr to 2.5 API.
...
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Douglas Gregor
1901e3e165
Fix a typo, and all of its copies
...
llvm-svn: 77489
2009-07-29 18:27:22 +00:00
Douglas Gregor
f5e7c2fbfc
Implement PointerUnion4.
...
llvm-svn: 77487
2009-07-29 18:19:47 +00:00
Devang Patel
18dfdc99af
Keep track of named mdnodes in a Module using an ilist.
...
llvm-svn: 77476
2009-07-29 17:16:17 +00:00
Daniel Dunbar
b5a5de291d
Add missing include.
...
llvm-svn: 77470
2009-07-29 16:45:40 +00:00
Bob Wilson
cf19885a32
Change Neon VLDn intrinsics to return multiple values instead of really
...
wide vectors. Likewise, change VSTn intrinsics to take separate arguments
for each vector in a multi-vector struct. Adjust tests accordingly.
llvm-svn: 77468
2009-07-29 16:39:22 +00:00
David Greene
ea2f1ceb4b
Re-apply previous changes and improve column padding performance some more.
...
llvm-svn: 77461
2009-07-29 16:08:27 +00:00
Devang Patel
b2cde2db67
Fix comment.
...
llvm-svn: 77457
2009-07-29 15:52:49 +00:00
Devang Patel
262922d8d0
trim include list.
...
llvm-svn: 77455
2009-07-29 15:24:54 +00:00
Benjamin Kramer
573720e185
MSVC build fix. Patch by Olaf Krzikalla!
...
llvm-svn: 77450
2009-07-29 11:21:25 +00:00
Daniel Dunbar
b49994ad7e
Twines: Support numeric conversion directly (uitostr, etc).
...
- Provides static constructors for doing number to string conversions without
using temporaries.
- There are several ways to do this, I think given the Twine constraints this
is the simplest one.
- One FIXME for fast number -> hex conversion.
- Added another comment on one last major bit of perf work Twines need, which
is to make raw_svector_ostream more efficient.
llvm-svn: 77445
2009-07-29 07:08:44 +00:00
Andreas Bolka
43797d15fa
Skeleton for pairwise subscript testing.
...
llvm-svn: 77437
2009-07-29 05:35:53 +00:00
Chris Lattner
5034329f8d
pass the mangler down into the various SectionForGlobal methods.
...
No functionality change.
llvm-svn: 77432
2009-07-29 05:09:30 +00:00
Daniel Dunbar
af71a3035b
Revert r77397, it causes significant regressions in llc performance.
...
llvm-svn: 77425
2009-07-29 03:04:22 +00:00
Devang Patel
05a26fb6dd
Add NamedMDNode.
...
llvm-svn: 77409
2009-07-29 00:33:07 +00:00
Eric Christopher
f7802a33ce
Add support for gcc __builtin_ia32_ptest{z,c,nzc} intrinsics. Lower
...
to ptest instruction plus setcc. Revamp ptest instruction. Add test.
llvm-svn: 77407
2009-07-29 00:28:05 +00:00
Daniel Dunbar
0033199c50
Match X86 register names to number.
...
llvm-svn: 77404
2009-07-29 00:02:19 +00:00
David Greene
5f6511c3d5
Improve performance of PadToColumn by eliminating flushes.
...
llvm-svn: 77397
2009-07-28 23:26:34 +00:00
David Greene
1fc3a20ccf
Add some protected interfaces to allow subclass access to the buffer.
...
llvm-svn: 77395
2009-07-28 23:24:58 +00:00
Daniel Dunbar
e1fdb0e8ce
Move X86 instruction parsing into X86/AsmParser.
...
llvm-svn: 77384
2009-07-28 22:40:46 +00:00
Devang Patel
e2d3dd66f1
Clarify getName() comment.
...
llvm-svn: 77383
2009-07-28 22:30:52 +00:00
Daniel Dunbar
c43267a472
Make expression parsing and error/warning reporting available through the
...
generic MCAsmParser interface.
llvm-svn: 77381
2009-07-28 22:22:31 +00:00
Devang Patel
f869caa03f
Remove unused method.
...
llvm-svn: 77378
2009-07-28 22:04:55 +00:00
Bill Wendling
fb5d83fb10
Remove unused parameter name.
...
llvm-svn: 77371
2009-07-28 21:50:32 +00:00
Devang Patel
a4f43fb5dd
Rename MDNode.h header. It defines MDnode and other metadata classes.
...
New name is Metadata.h.
llvm-svn: 77370
2009-07-28 21:49:47 +00:00
Owen Anderson
4aa3295a65
Return ConstantVector to 2.5 API.
...
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Daniel Dunbar
f59ee96a16
Provide generic MCAsmParser when constructing target specific parsers.
...
llvm-svn: 77362
2009-07-28 20:47:52 +00:00
Devang Patel
1da7555a28
Add DebugInfoEnumerator to collect debug info.
...
llvm-svn: 77360
2009-07-28 19:55:13 +00:00
Andreas Bolka
f1bd1edc11
Simplify LDA-internal interface.
...
llvm-svn: 77359
2009-07-28 19:50:13 +00:00
Owen Anderson
c2c7932c64
Change ConstantArray to 2.5 API.
...
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Daniel Dunbar
6d1e79dded
Expose Tokens to target specific assembly parsers.
...
llvm-svn: 77337
2009-07-28 17:58:44 +00:00
Chris Lattner
a3242e93b7
the apple "ld_classic" linker doesn't support .literal16 in 32-bit
...
mode, and "ld64" (the default linker) falls back to it in -static
mode.
llvm-svn: 77334
2009-07-28 17:50:28 +00:00
Stefanus Du Toit
5ea6a1f118
Include cmath/math.h in DataTypes.h regardless of whether MSVC is being used.
...
Fixes MSVC build of LiveInterval.cpp.
Patch by Nicolas Capens.
llvm-svn: 77317
2009-07-28 13:41:07 +00:00
Chris Lattner
5e693ed07b
Rip all of the global variable lowering logic out of TargetAsmInfo. Since
...
it is highly specific to the object file that will be generated in the end,
this introduces a new TargetLoweringObjectFile interface that is implemented
for each of ELF/MachO/COFF/Alpha/PIC16 and XCore.
Though still is still a brutal and ugly refactoring, this is a major step
towards goodness.
This patch also:
1. fixes a bunch of dangling pointer problems in the PIC16 backend.
2. disables the TargetLowering copy ctor which PIC16 was accidentally using.
3. gets us closer to xcore having its own crazy target section flags and
pic16 not having to shadow sections with its own objects.
4. fixes wierdness where ELF targets would set CStringSection but not
CStringSection_. Factor the code better.
5. fixes some bugs in string lowering on ELF targets.
llvm-svn: 77294
2009-07-28 03:13:23 +00:00
Daniel Dunbar
eb6bb32bef
llvm-mc: Implement .abort fully in the front end
...
llvm-svn: 77272
2009-07-27 23:20:52 +00:00
Daniel Dunbar
30ab4a9fdc
Add a comment on Value explaining the current getName() behavior.
...
llvm-svn: 77269
2009-07-27 22:39:14 +00:00
Owen Anderson
45308b578b
Move ConstantStruct back to 2.5 API.
...
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Dan Gohman
1639c3905e
Add a new keyword 'inbounds' for use with getelementptr. See the
...
LangRef.html changes for details.
llvm-svn: 77259
2009-07-27 21:53:46 +00:00
Daniel Dunbar
52d03b252e
llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.
...
- My DFS traversal of LLVM is, at least for now, nearly complete! :)
llvm-svn: 77258
2009-07-27 21:49:56 +00:00
Dan Gohman
1aefb721fc
Order unsigned before signed, for consistency.
...
llvm-svn: 77257
2009-07-27 21:49:34 +00:00
Dan Gohman
4b66b47a7c
Make raw_null_ostream flush its buffer in its destructor, so that
...
it conforms to the assertion added in r77245. This fixes a failure
in qa_override.c in clang's testsuite.
llvm-svn: 77255
2009-07-27 21:46:02 +00:00
Chris Lattner
9d0e762c81
hoist MCContext/MCStreamer up to AsmPrinter since we're going to start creating
...
MCSections soon instead of Section for all targets, and we need something to
own them.
llvm-svn: 77252
2009-07-27 21:28:04 +00:00
Daniel Dunbar
a87555aaa8
Move MCContext and friends to StringRef based APIs.
...
llvm-svn: 77251
2009-07-27 21:22:30 +00:00
Chris Lattner
9f79643f4b
simplify #includes.
...
llvm-svn: 77250
2009-07-27 21:13:35 +00:00
Owen Anderson
69c464dec4
Move ConstantFP construction back to the 2.5-ish API.
...
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Devang Patel
9db94d1480
80 columns!
...
llvm-svn: 77243
2009-07-27 20:30:05 +00:00
Sean Callanan
83154cf240
Thanks, Bill!
...
llvm-svn: 77240
2009-07-27 19:45:28 +00:00
Chris Lattner
e7cb8f7987
Sink getSectionPrefixForUniqueGlobal down into the TAI
...
implementations that need it, rearrange ELFTAI.
llvm-svn: 77236
2009-07-27 19:14:14 +00:00
Sean Callanan
5908cfedbb
Many of Daniel's fixes.
...
I'm returning the number of bytes actually copied so that the client has some
warning when it reads past the end of the buffer.
I'm keeping the distinction between getByte() and getBytes() for now for
subclasses that use functions like ptrace() on Linux and only have a restricted
interface. This makes their implementation easier, and subclasses can always
write a one-line implementation of readByte() that uses their custom
readBytes().
llvm-svn: 77225
2009-07-27 18:33:24 +00:00
Douglas Gregor
24be97df67
CMake configuration: find mkdtemp, mkstemp, mktemp.
...
llvm-svn: 77219
2009-07-27 18:23:41 +00:00
Chris Lattner
1814e81e17
make COFF work like ELF and macho, by splitting out into its own
...
header even though there is only one COFF target.
llvm-svn: 77204
2009-07-27 16:45:59 +00:00
Chris Lattner
543c83e8f2
inline a method.
...
llvm-svn: 77198
2009-07-27 16:27:32 +00:00
Dan Gohman
169ef138e8
Fix wording in comments.
...
llvm-svn: 77193
2009-07-27 16:09:48 +00:00
Chris Lattner
86b7255776
Eliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection
...
instead.
llvm-svn: 77186
2009-07-27 06:17:14 +00:00
Chris Lattner
149465ea06
Eliminate SectionFlags, just embed a SectionKind into Section
...
instead and drive things based off of that.
llvm-svn: 77184
2009-07-27 05:32:16 +00:00
Chris Lattner
602d44fa70
untangle a TargetAsmInfo hack where ELFTargetAsmInfo would create a
...
'unnamed' bss section, but some impls would want a named one. Since
they don't have consistent behavior, just make each target do their
own thing, instead of doing something "sortof common" then having
targets change immutable objects later.
llvm-svn: 77165
2009-07-26 19:23:28 +00:00
Chris Lattner
e3c374ac33
Use the RHS length instead of the LHS length. They are both the same,
...
but this ends up compiling code like this:
int foo(const StringRef &R) {
return R == "food";
}
to use a constant sized memcmp instead of a variable memcmp.
llvm-svn: 77160
2009-07-26 17:46:03 +00:00
Daniel Dunbar
6115b39ffd
Remove Value::getName{Start,End}, the last of the old Name APIs.
...
llvm-svn: 77152
2009-07-26 09:48:23 +00:00
Daniel Dunbar
ca414c7cae
Remove Value::getNameLen
...
llvm-svn: 77148
2009-07-26 08:34:35 +00:00
Daniel Dunbar
9813b0b025
Eliminate some uses of DOUT, cerr, and getNameStart().
...
llvm-svn: 77145
2009-07-26 07:49:05 +00:00
Chris Lattner
1db210322a
remove a densemap from TargetAsmInfo that was uniquing the targetflags strings,
...
just use a smallstring instead.
llvm-svn: 77144
2009-07-26 07:33:58 +00:00
Chris Lattner
9db3a9286d
make SectionKind keep track of whether a global had an explicit
...
section specified for it or not.
llvm-svn: 77142
2009-07-26 07:14:28 +00:00
Chris Lattner
e45ff5cc2b
make SectionKind know whether a symbol is weak or not in addition
...
to its classification.
llvm-svn: 77140
2009-07-26 07:00:12 +00:00
Chris Lattner
b1575e2aec
Make the kind actually be private.
...
llvm-svn: 77139
2009-07-26 06:51:27 +00:00
Chris Lattner
29151b0218
rename Mergable -> Mergeable and Writable -> Writeable
...
llvm-svn: 77138
2009-07-26 06:48:26 +00:00
Chris Lattner
2d7270d577
remove a bunch of helper functions, just use SectionKind::get instead.
...
llvm-svn: 77135
2009-07-26 06:34:33 +00:00
Chris Lattner
fb6867c7db
simplify getSectionForMergableConstant to take a SectionKind.
...
llvm-svn: 77134
2009-07-26 06:26:55 +00:00
Chris Lattner
aae21f4915
precreate 4/8/16 byte mergable sections to simplify code.
...
llvm-svn: 77133
2009-07-26 06:16:11 +00:00
Chris Lattner
911e2b8649
introduce specialized mergable const sectionkinds for elements of size 4/8/16 to
...
simplify targets.
llvm-svn: 77132
2009-07-26 06:11:33 +00:00
Chris Lattner
1d68bd7f97
Rearrange all the SectionKinds and structure them into a hierarchical
...
group instead of a bunch of random unrelated ideas. Provide predicates
to categorize a SectionKind into a group, and use them instead of
getKind() throughout the code.
This also renames a ton of SectionKinds to be more consistent and
evocative, and adds a huge number of comments on the enums so that
I will hopefully be able to remember how this stuff works long from
now.
llvm-svn: 77129
2009-07-26 05:44:20 +00:00
Daniel Dunbar
ee01b242e8
Factor commonality in triple match routines into helper template for registering
...
classes, and migrate existing targets over.
llvm-svn: 77126
2009-07-26 05:03:33 +00:00
Daniel Dunbar
bd481a119c
Oops, forgot XCore. Sorry XCore!
...
llvm-svn: 77125
2009-07-26 04:52:45 +00:00
Daniel Dunbar
172649be2c
Update for API change.
...
llvm-svn: 77124
2009-07-26 04:23:03 +00:00
Chris Lattner
e24002f37f
fix isReadOnly predicate to not include data that has to be
...
writable because of teh dynamic linker.
llvm-svn: 77122
2009-07-26 04:18:10 +00:00
Chris Lattner
d71c1009c2
remove a dead enum case.
...
llvm-svn: 77121
2009-07-26 04:09:02 +00:00
Daniel Dunbar
19e7076ddd
Update Triple to use StringRef/Twine based APIs.
...
- This is now shorter, simpler, safer, and more efficient, what a deal.
llvm-svn: 77119
2009-07-26 03:31:47 +00:00
Daniel Dunbar
56563f33f7
Add StringRef::{slice, split}, two convenient string operations which are simple
...
and efficient on a StringRef.
llvm-svn: 77117
2009-07-26 03:18:15 +00:00
Chris Lattner
8e58bc9ed4
put normal data into .data instead of .data.rel on elf systems.
...
llvm-svn: 77116
2009-07-26 03:06:11 +00:00
Daniel Dunbar
bc981d8efa
Kill Target specific ModuleMatchQuality stuff.
...
- This was overkill and inconsistently implemented.
llvm-svn: 77114
2009-07-26 02:22:58 +00:00
Daniel Dunbar
47d679151b
Add TargetRegistry::lookupTarget.
...
- This is a simplified mechanism which just looks up a target based on the
target triple, with a few additional flags.
- Remove getClosestStaticTargetForModule, the moral equivalent is now:
lookupTarget(Mod->getTargetTriple, true, false, ...);
- This no longer does the fuzzy matching with target data (based on endianness
and pointer width) that getClosestStaticTargetForModule was doing, but this
was deemed unnecessary.
llvm-svn: 77111
2009-07-26 02:12:58 +00:00
Chris Lattner
397792d981
finish simplifying DarwinTargetAsmInfo::SelectSectionForGlobal
...
for now. Make the section switching directives more consistent
by not including \n and including \t for them all.
llvm-svn: 77107
2009-07-26 01:24:18 +00:00
Daniel Dunbar
3c27648eda
Some clients rely on getName{Start,End} not returning 0, even if the length is
...
0.
- I could have swore the prev change went through a make check cycle...
llvm-svn: 77106
2009-07-26 01:04:10 +00:00
Daniel Dunbar
32285942a1
Rewrite getName{Start,End,Len} in terms of getName(), instead of vice-versa.
...
llvm-svn: 77105
2009-07-26 00:51:56 +00:00
Chris Lattner
26ce308bbf
simplify some predicates, add isMergableString()
...
llvm-svn: 77103
2009-07-26 00:50:43 +00:00
Daniel Dunbar
d786b51ea4
Remove Value::setName(const char*, unsigned).
...
llvm-svn: 77100
2009-07-26 00:34:27 +00:00
Daniel Dunbar
987ec564e7
Remove Value::setName(const char*).
...
- Split into a separate patch because there is a slight functionality change,
it is no longer valid to call setName(0), which was equivalent to
setName(""). I'm hoping no one depends on this...
llvm-svn: 77099
2009-07-26 00:17:14 +00:00
Daniel Dunbar
e03eecb75f
Remove Value::{isName, getNameRef}.
...
Also, change MDString to use a StringRef.
llvm-svn: 77098
2009-07-25 23:55:21 +00:00
Chris Lattner
0af00396a7
make SectionKind be a first-class pod struct instead of just
...
an enum.
llvm-svn: 77096
2009-07-25 23:21:55 +00:00
Chris Lattner
60f3b73e11
this is (unfortunately) several changes mixed together:
...
1. Spell SectionFlags::Writeable as "Writable".
2. Add predicates for deriving SectionFlags from SectionKinds.
3. Sink ELF-specific getSectionPrefixForUniqueGlobal impl into
ELFTargetAsmInfo.
4. Fix SectionFlagsForGlobal to know that BSS/ThreadBSS has the
BSS bit set (the real fix for PR4619).
5. Fix isSuitableForBSS to not put globals with explicit sections
set in BSS (which was the reason #4 wasn't fixed earlier).
6. Remove my previous hack for PR4619.
llvm-svn: 77085
2009-07-25 18:57:34 +00:00
Chris Lattner
7b5e51091e
document some invariants.
...
llvm-svn: 77084
2009-07-25 18:11:58 +00:00
Dan Gohman
3d0b52caf1
Fix a few comments to say "backedge-taken count" instead of
...
"trip count".
llvm-svn: 77081
2009-07-25 16:18:38 +00:00
Dan Gohman
83b3b3d144
Update comments to new-style syntax.
...
llvm-svn: 77079
2009-07-25 16:03:55 +00:00
Dan Gohman
b7e6a3f527
Remove spurious semicolons.
...
llvm-svn: 77077
2009-07-25 16:00:54 +00:00
Daniel Dunbar
691a4784db
Simplify JIT target selection.
...
- Instead of requiring targets to define a JIT quality match function, we just
have them specify if they support a JIT.
- Target selection for the JIT just gets the host triple and looks for the best
target which matches the triple and has a JIT.
llvm-svn: 77060
2009-07-25 10:09:50 +00:00
Daniel Dunbar
5680b4f285
Add new helpers for registering targets.
...
- Less boilerplate == good.
llvm-svn: 77052
2009-07-25 06:49:55 +00:00
Daniel Dunbar
d43b86d4a4
Finish migrating VMCore to StringRef/Twine based APIs.
...
llvm-svn: 77051
2009-07-25 06:02:13 +00:00
Daniel Dunbar
4975db6276
Initial update to VMCore to use Twines for string arguments.
...
- The only meat here is in Value.{h,cpp} the rest is essential 'const
std::string &' -> 'const Twine &'.
llvm-svn: 77048
2009-07-25 04:41:11 +00:00
Eric Christopher
c974225976
Move ExtractElementInst to ::Create instead of new. Update all uses.
...
llvm-svn: 77044
2009-07-25 02:28:41 +00:00
Dan Gohman
29f2baf3b3
Convert a few more uses of llvm/Support/Streams.h to raw_ostream.
...
llvm-svn: 77033
2009-07-25 01:13:51 +00:00
Dan Gohman
0b89dff37d
Instead of eagerly creating new SCEVs to replace all SCEVs that are
...
affected after a PHI node has been analyzed, just remove affected
SCEVs from the Scalars map, so that they'll be (lazily) recreated as
needed. This avoids creating SCEV objects that aren't actually needed.
Also, rewrite the associated def-use walking code to be non-recursive
and to continue traversing past Instructions that don't have an
entry in the Scalars map.
llvm-svn: 77032
2009-07-25 01:13:03 +00:00
Dan Gohman
43d19d61d4
Make AliasAnalysis and related classes use
...
getAnalysisIfAvailable<TargetData>().
llvm-svn: 77028
2009-07-25 00:48:42 +00:00
Jeffrey Yasskin
f4e1db1722
Add a missing ilist_node.h #include to SparseBitVector, and add a very short
...
test for it. The test is by no means complete, but it tests the problem I was
fixing.
llvm-svn: 77025
2009-07-25 00:33:57 +00:00
Sean Callanan
bcf2ae6aa5
MemoryObject - Abstract base class for contiguous addressable memory.
...
Necessary for cases in which the memory is in another process, in a
file, or on a remote machine.
The primary use for this is the llvm-mc disassemblers, so that they
can be targeted at arbitrary objects, not just in-process memory.
llvm-svn: 77023
2009-07-25 00:30:51 +00:00
Andreas Bolka
c76c723e25
Forward-declare raw_ostream.
...
llvm-svn: 77014
2009-07-24 23:19:28 +00:00
Owen Anderson
edb4a70325
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
...
llvm-svn: 77011
2009-07-24 23:12:02 +00:00
Chris Lattner
70fa4661eb
fix some predicates
...
llvm-svn: 76999
2009-07-24 20:27:11 +00:00
Chris Lattner
a39aaa5fd5
change SectionKindForGlobal from being a public (and
...
previously virtual) function to being a static function
in the .cpp file.
llvm-svn: 76997
2009-07-24 20:14:10 +00:00
Chris Lattner
708e559247
make SectionKindForGlobal target independent, and therefore non-virtual.
...
It's classifications now include elf-specific discriminators. Targets
that don't have these features (like darwin and pecoff) simply treat
data.rel like data, etc.
llvm-svn: 76993
2009-07-24 19:15:47 +00:00
Chris Lattner
73f6651439
we already know the sectionkind when invoking SelectSectionForGlobal,
...
pass it in instead of recomputing it.
llvm-svn: 76990
2009-07-24 18:42:53 +00:00
Chris Lattner
bf9ac228f7
make SectionForGlobal non-virtual, add a hook for pic16 to do its "address=" hack.
...
llvm-svn: 76989
2009-07-24 18:34:27 +00:00
Jakob Stoklund Olesen
1ae0736830
Add support for promoting SETCC operations.
...
llvm-svn: 76987
2009-07-24 18:22:59 +00:00
Dan Gohman
67243a4bec
Convert several more passes to use getAnalysisIfAvailable<TargetData>()
...
instead of getAnalysis<TargetData>().
llvm-svn: 76982
2009-07-24 18:13:53 +00:00
Dan Gohman
799ac53de1
Add specific classes for Add, Sub, and Mul, for convenience.
...
llvm-svn: 76981
2009-07-24 18:12:25 +00:00
Chris Lattner
9b6370d230
move ELF-specific code into ELFTargetAsmInfo.
...
llvm-svn: 76976
2009-07-24 17:02:17 +00:00
Chris Lattner
a5ca93cdd5
make SectionFlagsForGlobal a private static function instead of a public
...
virtual one.
llvm-svn: 76973
2009-07-24 16:46:50 +00:00
Daniel Dunbar
796e43eede
Move more to raw_ostream, provide support for writing MachineBasicBlock,
...
LiveInterval, etc to raw_ostream.
llvm-svn: 76965
2009-07-24 10:36:58 +00:00
Daniel Dunbar
8ef0735dd5
Move to raw_ostream.
...
llvm-svn: 76963
2009-07-24 09:53:24 +00:00
Daniel Dunbar
cd51ea510a
Allow llvm_report_error to accept a Twine.
...
llvm-svn: 76961
2009-07-24 07:58:10 +00:00
Eli Friedman
95fc6ee51a
Remove unused member functions.
...
llvm-svn: 76960
2009-07-24 07:43:59 +00:00
Daniel Dunbar
c4b4ad236d
Fix constructor types
...
llvm-svn: 76958
2009-07-24 07:12:20 +00:00
Daniel Dunbar
afcf5b30cb
Add Twine ADT.
...
- Not currently used.
llvm-svn: 76956
2009-07-24 07:04:27 +00:00
Chris Lattner
febe552dbd
Implement getSectionPrefixForUniqueGlobal to return null, indicating that
...
darwin does it's own unique and special and wonderful thing.
llvm-svn: 76952
2009-07-24 05:02:38 +00:00
Chris Lattner
0f5ebf5509
Replace UniqueSectionForGlobal with getSectionPrefixForUniqueGlobal.
...
The later doesn't depend on any crazy LLVM IR stuff, and this
pulls the concatenation of prefix with GV name (the root problem behind
PR4584) out one level.
llvm-svn: 76948
2009-07-24 04:49:34 +00:00
Chris Lattner
68d64a2d90
document SectionFlags::Named better and make it more easily greppable by
...
eliminating isNamed.
llvm-svn: 76946
2009-07-24 04:26:19 +00:00
Chris Lattner
1553fdee55
use section flags more correctly.
...
llvm-svn: 76944
2009-07-24 04:08:17 +00:00
Chris Lattner
5cd4dd391f
make Constant::getRelocationInfo return an enum, as suggested by Duncan.
...
llvm-svn: 76938
2009-07-24 03:27:21 +00:00
Chris Lattner
74b8117134
remove more bits of small section support.
...
llvm-svn: 76937
2009-07-24 03:16:53 +00:00
Chris Lattner
26aff56462
Remove SectionKind::Small*. This was only used on mips, and is apparently
...
a sad mistake that is regretted. :)
llvm-svn: 76935
2009-07-24 03:11:51 +00:00
Dan Gohman
55b9157dc5
Give SCEVAddRecExpr no-signed-overflow and no-unsigned-overflow flags.
...
llvm-svn: 76928
2009-07-24 01:01:06 +00:00
Dan Gohman
d87cf950e8
Give the SCEV class a SubclassData field.
...
llvm-svn: 76927
2009-07-24 00:59:53 +00:00
Dan Gohman
7daff0abeb
Fix whitespace.
...
llvm-svn: 76926
2009-07-24 00:55:33 +00:00
Owen Anderson
0348a13cc6
Privatize the ConstantVector tables.
...
llvm-svn: 76922
2009-07-24 00:36:24 +00:00
Dan Gohman
17151155ed
Remove the IA-64 backend.
...
llvm-svn: 76920
2009-07-24 00:30:09 +00:00
Owen Anderson
909f6001e9
Privatize the ConstantStruct table.
...
llvm-svn: 76912
2009-07-23 23:25:33 +00:00
David Greene
8e621f0182
Write space padding as one string to speed up comment printing.
...
llvm-svn: 76910
2009-07-23 23:21:10 +00:00
Reid Kleckner
4b3a356493
Re-committing r76828 with the JIT memory manager changes now that the build
...
bots like the BumpPtrAllocator changes.
llvm-svn: 76902
2009-07-23 21:46:56 +00:00
Duncan Sands
1f3b8c0d16
Fix PR4614: the Intel C compiler defines _GNUC__
...
but does not provide __builtin_bswap32/64.
llvm-svn: 76896
2009-07-23 19:08:27 +00:00
Daniel Dunbar
84b5f6efb7
Switch ValueSymbolTable to StringRef based API.
...
llvm-svn: 76894
2009-07-23 18:52:12 +00:00
Daniel Dunbar
f01154cf2c
Add llvm::Value::getNameRef, for help in API migration.
...
llvm-svn: 76893
2009-07-23 18:50:53 +00:00
Reid Kleckner
c2d882dd1a
Re-committing changes from r76825 to BumpPtrAllocator with a fix and tests for
...
an off-by-one error.
llvm-svn: 76891
2009-07-23 18:34:13 +00:00
Daniel Dunbar
5bf72e20eb
Convert StringMap to using StringRef for its APIs.
...
- Yay for '-'s and simplifications!
- I kept StringMap::GetOrCreateValue for compatibility purposes, this can
eventually go away. Likewise the StringMapEntry Create functions still follow
the old style.
- NIFC.
llvm-svn: 76888
2009-07-23 18:17:34 +00:00
Andrew Lenharth
57e9daaf33
emit simple node was using different labels for fields than the rest of the graph writter
...
llvm-svn: 76879
2009-07-23 15:24:38 +00:00
Andreas Bolka
c8cd3f6959
Cache dependence computation using FoldingSet.
...
This introduces an LDA-internal DependencePair class. The intention is,
that this is a place where dependence testers can store various results
such as SCEVs describing conflicting iterations, breaking conditions,
distance/direction vectors, etc.
llvm-svn: 76877
2009-07-23 14:32:46 +00:00
Chris Lattner
7b9dda45f0
enhance DepthFirstIterator to support more robust operations in the face
...
of code mutating the graph while it is being traversed. Patch by
Olaf Krzikalla!
llvm-svn: 76869
2009-07-23 06:30:28 +00:00
Chris Lattner
02def54fa1
remove a really old and dead header
...
llvm-svn: 76855
2009-07-23 04:59:02 +00:00
Devang Patel
6292003492
MDString
...
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.
llvm-svn: 76841
2009-07-23 02:00:51 +00:00
Andreas Bolka
897e68c660
Minor cosmetics: indentation, formatting, naming.
...
llvm-svn: 76839
2009-07-23 01:57:06 +00:00
Reid Kleckner
921673225c
Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
...
llvm-svn: 76838
2009-07-23 01:40:54 +00:00
Devang Patel
8392e3ba37
Hide constructors.
...
llvm-svn: 76835
2009-07-23 01:19:53 +00:00
Devang Patel
e059ba6ed2
Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
...
llvm-svn: 76834
2009-07-23 01:07:34 +00:00
Reid Kleckner
1a722d9b73
Make the JIT code emitter properly retry and ask for more memory when it runs
...
out of memory, and also make the default memory manager allocate more memory
when it runs out.
Also, switch function stubs and global data over to using the BumpPtrAllocator.
This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB
of memory, and instead allocates in 512K slabs. I suspect this size could go
lower, especially on embedded platforms, now that more slabs can be allocated.
llvm-svn: 76828
2009-07-23 00:49:59 +00:00
Reid Kleckner
5bd6105d65
Parameterize the BumpPtrAllocator over a slab allocator. It defaults to using
...
malloc, so there should be no functional changes to other code.
These changes are necessary since I have plans to use this allocator in the JIT
memory manager, and it needs a special allocator.
I also added some tests which helped me pinpoint some bugs.
llvm-svn: 76825
2009-07-23 00:30:41 +00:00
Chris Lattner
d2aeef0703
remove SectionFlags::Small: it is only used on Xcore, and we'll find
...
a better solution for it in the future.
llvm-svn: 76818
2009-07-22 23:27:22 +00:00
David Greene
e88680e33e
Constify the key in Mi2IndexMap.
...
llvm-svn: 76801
2009-07-22 21:56:14 +00:00
Daniel Dunbar
4a6554006d
Define npos in a way that should make MSVC happier.
...
llvm-svn: 76785
2009-07-22 21:08:31 +00:00
David Greene
6e2eda1c8d
Put comment printing under asm-verbose.
...
llvm-svn: 76780
2009-07-22 20:33:26 +00:00
David Greene
1e2a04ba99
Make some changes suggested by Bill and Evan.
...
llvm-svn: 76775
2009-07-22 20:08:25 +00:00
Devang Patel
f03c9bec63
Add replaceAllUsesWith() to FE replace debug info constructs while building complex types.
...
llvm-svn: 76765
2009-07-22 18:23:44 +00:00
Devang Patel
7428d8acec
Introduce MetadataBase, a base class for MDString and MDNode.
...
Derive MDString directly from MetadataBase.
Introduce new bitcode block to hold metadata.
llvm-svn: 76759
2009-07-22 17:43:22 +00:00
Daniel Dunbar
e23388b25c
Support writing a StringRef to a raw_ostream directly.
...
llvm-svn: 76754
2009-07-22 17:13:20 +00:00
Torok Edwin
23f730ab40
Remove a comment that was copy+pasted from the wrong place,
...
there is no MachineFunction here.
llvm-svn: 76734
2009-07-22 10:49:23 +00:00
Eli Friedman
326d3a1bc8
Attempt to fix BuildBot breakage with MSVC.
...
llvm-svn: 76722
2009-07-22 05:06:41 +00:00
Eric Christopher
394dfd2998
Remove intrinsic support for __builtin_ia32_vec_set_v16qi and
...
__builtin_ia32_vec_set_v4si as these should be lowered in the
front-end to inserts.
llvm-svn: 76714
2009-07-22 01:11:48 +00:00
Chris Lattner
fd164b863f
inline the two MergeableConstSection implementations into their
...
only caller.
llvm-svn: 76710
2009-07-22 00:47:11 +00:00
Chris Lattner
b300a4f988
remove the SelectSectionForMachineConst hook, replacing it with
...
a new getSectionForMergableConstant hook. This removes one dependence
of TAI on Type, and provides the hook with enough info to make the
right decision based on whether the global has relocations etc.
llvm-svn: 76705
2009-07-22 00:28:43 +00:00
Evan Cheng
4dc848f3e8
Let each target determines whether a machine instruction is dead. If true, that allows late codeine passes to delete it.
...
This is considered a workaround. The problem is some targets are not modeling side effects correctly. PPC is apparently one of those. This patch allows ppc llvm-gcc to bootstrap on Darwin. Once we find out which instruction definitions are wrong, we can remove the PPCInstrInfo workaround.
llvm-svn: 76703
2009-07-22 00:25:27 +00:00
Owen Anderson
47db941fd3
Get rid of the Pass+Context magic.
...
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Chris Lattner
4565ef5b65
reimplement Constant::ContainsRelocations as
...
Constant::getRelocationInfo(), which has a much simpler
to use API. It still should not be part of libvmcore, but
is better than it was. Also teach it to be smart about
hidden visibility.
llvm-svn: 76700
2009-07-22 00:05:44 +00:00
Chris Lattner
e61aff6df1
Now that RelocBehaviour() is never overloaded, it doesn't need to be
...
virtual. Just inline it into its two current call sites in preparation
for simplifying the code.
llvm-svn: 76686
2009-07-21 23:47:11 +00:00
Eric Christopher
90c67c6310
Add intrinsic for __builtin_ia32_vec_set_v4si which turns out to be
...
pinsrd in sse4.1.
llvm-svn: 76684
2009-07-21 23:43:14 +00:00
Chris Lattner
9bd736e2f7
no really, I can spell!
...
llvm-svn: 76679
2009-07-21 23:36:01 +00:00
Chris Lattner
cfb01e26bc
add an API so target-independent codegen can determine if a constant
...
pool entry will require relocations against it. I implemented this
conservatively for ARM, someone who is knowledgable about it should
see if this can be improved.
llvm-svn: 76678
2009-07-21 23:34:23 +00:00
Dan Gohman
9413de19b1
Permit the IntPtrTy argument to isEliminableCastPair to be null,
...
to help support use when TargetData is not available.
llvm-svn: 76675
2009-07-21 23:19:40 +00:00
Bruno Cardoso Lopes
40ca1f1c2e
Change ELFCodeEmitter logic to emit the constant pool and jump tables to
...
their appropriate sections before the code itself. They need to be emitted
before the function because on some targets (x86 but not x86_64) the later
may reference a JT or CP entry address
llvm-svn: 76672
2009-07-21 23:13:26 +00:00
Dan Gohman
430f0cc544
Replace the original ad-hoc code for determining whether (v pred w) implies
...
(x pred y) with more thorough code that does more complete canonicalization
before resorting to range checks. This helps it find more cases where
the canonicalized expressions match.
llvm-svn: 76671
2009-07-21 23:03:19 +00:00
Chris Lattner
5626b88047
make some stuff private.
...
llvm-svn: 76661
2009-07-21 22:30:39 +00:00
Chris Lattner
0d982f9a8a
improve comments.
...
llvm-svn: 76660
2009-07-21 22:30:25 +00:00
Daniel Dunbar
b5ea06bbbf
Add missing include
...
llvm-svn: 76655
2009-07-21 21:33:58 +00:00
Chris Lattner
4d5c3b2e86
inline a trivial method into its only call site and fix indentation of cases
...
llvm-svn: 76654
2009-07-21 21:29:08 +00:00
Chris Lattner
fd047e11a1
Remove some overridden functions in XCoreTargetAsmInfo that are
...
implemented exactly the same way as its ELFTargetAsmInfo subclass
has them.
llvm-svn: 76653
2009-07-21 21:26:32 +00:00
Chris Lattner
1eede6c635
revert r76602, 76603, and r76615, pending design discussions.
...
llvm-svn: 76646
2009-07-21 21:12:58 +00:00
Owen Anderson
3d34492c1f
Privatize the ConstantArray table.
...
llvm-svn: 76639
2009-07-21 20:55:28 +00:00
Owen Anderson
39ede7b8d1
Privatize the first of the value maps.
...
llvm-svn: 76634
2009-07-21 20:13:12 +00:00
Eli Friedman
da9eda8ef6
Remove shift amount flavor. It isn't actually complete enough to
...
be useful, and it's currently unused. (Some issues: it isn't actually
rich enough to capture the semantics on many architectures, and
semantics can vary depending on the type being shifted.)
llvm-svn: 76633
2009-07-21 20:12:16 +00:00
David Greene
ef1f36d3c7
Prefix IR dumps with LiveInterval indices when possible. This turns
...
this:
%ESI<def> = MOV32rr %EDI<kill>
ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
%reg1027<def> = MOVZX64rr32 %ESI
%reg1027<def> = ADD64ri8 %reg1027, 15, %EFLAGS<imp-def,dead>
%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
%RDI<def> = MOV64rr %RSP
%RDI<def> = SUB64rr %RDI, %reg1027<kill>, %EFLAGS<imp-def,dead>
%RSP<def> = MOV64rr %RDI
into this:
4 %reg1024<def> = MOV32rr %EDI<kill>
12 ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
20 %reg1025<def> = MOVZX64rr32 %reg1024
28 %reg1026<def> = MOV64rr %reg1025<kill>
36 %reg1026<def> = ADD64ri8 %reg1026, 15, %EFLAGS<imp-def,dead>
44 %reg1027<def> = MOV64rr %reg1026<kill>
52 %reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
60 %reg1028<def> = MOV64rr %RSP
68 %reg1029<def> = MOV64rr %reg1028<kill>
76 %reg1029<def> = SUB64rr %reg1029, %reg1027<kill>, %EFLAGS<imp-def,dead>
84 %RSP<def> = MOV64rr %reg1029
This helps greatly when debugging register allocation and coalescing
problems.
llvm-svn: 76615
2009-07-21 18:56:32 +00:00
Chris Lattner
100865e59d
make AsmPrinter::doFinalization iterate over the global variables
...
and call PrintGlobalVariable, allowing elimination and simplification
of various targets.
llvm-svn: 76604
2009-07-21 18:38:57 +00:00
David Greene
3b458645be
Add PrefixPrinter arguments to the dump routines for MachineFunction and
...
MachineBasicBlock. We'll use these shortly.
llvm-svn: 76603
2009-07-21 18:27:05 +00:00
David Greene
92ebf9dd6e
Add a small utility class to configure IR printers. This will allow
...
printers to do neat and wonderful things when printing debug
information. The ideas is to allow passes to configer printers to emit
pass-specific information when dumping IR.
llvm-svn: 76602
2009-07-21 18:21:46 +00:00
Owen Anderson
c37bc69e91
Rename getConstantInt{True|False} to get{True|False} at Chris' behest.
...
llvm-svn: 76598
2009-07-21 18:03:38 +00:00
Torok Edwin
26aafc1ab5
Add freed memory poisoning in !NDEBUG mode for DenseMap.
...
llvm-svn: 76597
2009-07-21 18:01:37 +00:00
Chris Lattner
1177cee9dc
Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
...
LLVM IR concept.
llvm-svn: 76590
2009-07-21 17:30:51 +00:00
Daniel Dunbar
731269f9a7
Move StringRef comparison operators out of class.
...
Also, tweak the return type of size().
llvm-svn: 76588
2009-07-21 17:25:46 +00:00
Daniel Dunbar
1f982105a6
Add StringRef::{substr, startswith}.
...
llvm-svn: 76559
2009-07-21 09:18:49 +00:00
Daniel Dunbar
25f9fc5851
Add StringRef class, with fixes.
...
llvm-svn: 76543
2009-07-21 07:28:51 +00:00
Owen Anderson
2ad52176f9
Move a bit more state over to the LLVMContext.
...
llvm-svn: 76533
2009-07-21 02:47:59 +00:00
David Greene
40c68ad3bb
Re-apply 75490, 75806 and 76177 with fixes and tests. Efficiency comes
...
next.
llvm-svn: 76486
2009-07-20 22:02:59 +00:00
Dan Gohman
0ebd69614c
Assembly and Bitcode support for unsigned/signed overflow flags and
...
exact sdiv flags.
llvm-svn: 76475
2009-07-20 21:19:07 +00:00