Owen Anderson
bdcb99324a
Privatize the first of the value maps.
...
llvm-svn: 76634
2009-07-21 20:13:12 +00:00
Eli Friedman
45160af6bd
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
94bfedaf40
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
3d4ab7a231
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
979d7aa03a
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
710a405072
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
7f61f8dc30
Rename getConstantInt{True|False} to get{True|False} at Chris' behest.
...
llvm-svn: 76598
2009-07-21 18:03:38 +00:00
Torok Edwin
4d8202474c
Add freed memory poisoning in !NDEBUG mode for DenseMap.
...
llvm-svn: 76597
2009-07-21 18:01:37 +00:00
Chris Lattner
0f65fbf095
Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
...
LLVM IR concept.
llvm-svn: 76590
2009-07-21 17:30:51 +00:00
Daniel Dunbar
7532049775
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
30c92a0aee
Add StringRef::{substr, startswith}.
...
llvm-svn: 76559
2009-07-21 09:18:49 +00:00
Daniel Dunbar
8ab30670cc
Add StringRef class, with fixes.
...
llvm-svn: 76543
2009-07-21 07:28:51 +00:00
Owen Anderson
b64eef73cf
Move a bit more state over to the LLVMContext.
...
llvm-svn: 76533
2009-07-21 02:47:59 +00:00
David Greene
1ac6d4ac0e
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
d2ad3e183b
Assembly and Bitcode support for unsigned/signed overflow flags and
...
exact sdiv flags.
llvm-svn: 76475
2009-07-20 21:19:07 +00:00
Dan Gohman
6f1417c7d0
Clarify that OverflowingBinaryOperator is not used for SDiv, even though
...
SDiv is a binary operation that can overflow.
llvm-svn: 76464
2009-07-20 20:32:43 +00:00
Kevin Enderby
f1c0daa6a7
Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API as
...
the parsing of the .dump and .load should be done in the assembly parser and
not have any need for an MCStreamer API. Changed the code for now so these
just produce an error saying these specific directives are not yet implemented
since they are likely no longer used and may never need to be implemented.
llvm-svn: 76462
2009-07-20 20:25:37 +00:00
Daniel Dunbar
2e4aeceacd
Add MCAsmLexer interface.
...
- This provides the AsmLexer interface to the target specific assembly parsers.
llvm-svn: 76460
2009-07-20 20:01:54 +00:00
Eli Friedman
2f54456ce5
Remove FIXME that was already fixed.
...
llvm-svn: 76457
2009-07-20 19:45:16 +00:00
Bill Wendling
0407ebb4f7
Rename Mangler linkage enums to something less gross.
...
llvm-svn: 76456
2009-07-20 19:41:27 +00:00
Daniel Dunbar
fca75cd98e
Add MCAsmParser interface.
...
- This provides the AsmParser interface to the target specific assembly
parsers.
llvm-svn: 76453
2009-07-20 18:55:04 +00:00
Chris Lattner
1f82d9a94c
remove TargetAsmInfo::ExpandInlineAsm
...
llvm-svn: 76445
2009-07-20 17:59:32 +00:00
Chris Lattner
72b24cbbf6
Copy ExpandInlineAsm to TargetLowering from TargetAsmInfo.
...
llvm-svn: 76441
2009-07-20 17:51:36 +00:00
Dan Gohman
d0a2cef334
Drop UDivOperator and introduce SDivOperator. Thanks to Chris
...
for noticing this.
llvm-svn: 76440
2009-07-20 17:51:10 +00:00
Chris Lattner
eebe4b24c3
add some fixme's and cleanups. TargetAsmInfo shouldn't depend on VMCore eventually.
...
llvm-svn: 76439
2009-07-20 17:47:48 +00:00
Dan Gohman
00b05492f1
Revert the addition of hasNoPointerOverflow to GEPOperator.
...
Getelementptrs that are defined to wrap are virtually useless to
optimization, and getelementptrs that are undefined on any kind
of overflow are too restrictive -- it's difficult to ensure that
all intermediate addresses are within bounds. I'm going to take
a different approach.
Remove a few optimizations that depended on this flag.
llvm-svn: 76437
2009-07-20 17:43:30 +00:00
Chris Lattner
eea9732c93
remove dead forward decl
...
llvm-svn: 76433
2009-07-20 17:23:00 +00:00
Chris Lattner
19134c0748
rename TargetAsmInfo::getASDirective -> getDataASDirective
...
llvm-svn: 76431
2009-07-20 17:12:46 +00:00
Daniel Dunbar
7c421ed7af
Fix comment.
...
llvm-svn: 76427
2009-07-20 16:50:16 +00:00
David Greene
5144b046cc
Hide the DOUT static variable behind a function interface.
...
llvm-svn: 76425
2009-07-20 16:16:06 +00:00
Bruno Cardoso Lopes
b47b093de2
For PC relative relocations where symbols are defined in the same section they
...
are referenced, ignore the relocation entry and patch the relocatable field with
the computed symbol offset directly
llvm-svn: 76414
2009-07-20 08:52:02 +00:00
Chris Lattner
eac40b1473
implement a new magic global "llvm.compiler.used" which is like llvm.used, but
...
doesn't cause ".no_dead_strip" to be emitted on darwin.
llvm-svn: 76399
2009-07-20 06:14:25 +00:00
Bill Wendling
1a10a060cb
Add plumbing for the `linker_private' linkage type. This type is meant for
...
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.
This is plumbing, so we don't have a use of it yet. More to come, etc.
llvm-svn: 76385
2009-07-20 01:03:30 +00:00
Daniel Dunbar
0686bcbe91
Remove redundant qualifiers.
...
llvm-svn: 76357
2009-07-19 01:42:34 +00:00
Bruno Cardoso Lopes
84568ea6f1
Use R_X86_64_32S to handle Jump Table Index relocation entries. Hide TAI usage inside getSection* functions
...
llvm-svn: 76347
2009-07-18 23:24:01 +00:00
Daniel Dunbar
cf7334116f
Add some missing includes.
...
llvm-svn: 76346
2009-07-18 23:22:46 +00:00
Mikhail Glushenkov
1c0854b913
Add a Program::GetPid() method.
...
llvm-svn: 76341
2009-07-18 21:43:40 +00:00
Mikhail Glushenkov
583e23d726
Remove duplication in Program::Execute{And,No}Wait.
...
Implemented by moving the code out of static functions into methods of Program
class.
llvm-svn: 76340
2009-07-18 21:43:12 +00:00
Bruno Cardoso Lopes
fc0fe7ea20
Use a better name for the label relocations while emitting them for Jump Tables
...
llvm-svn: 76334
2009-07-18 20:52:11 +00:00
Bruno Cardoso Lopes
d5eafae1fd
Add support to properly reference private symbols on relocation entries.
...
Use proper relocation type to build relocations for JumpTables (rodata
sections).
llvm-svn: 76326
2009-07-18 19:30:09 +00:00
Nick Lewycky
ec10fcbd04
Replace intersectWith with maximalIntersectWith. The latter guarantees that
...
all values belonging to the intersection will belong to the resulting range.
The former was inconsistent about that point (either way is fine, just pick
one.) This is part of PR4545.
llvm-svn: 76289
2009-07-18 06:34:42 +00:00
Evan Cheng
84f06f0ee6
Enable cross register class coalescing.
...
llvm-svn: 76281
2009-07-18 02:10:10 +00:00
Evan Cheng
fe529a2c29
Revert 76177 for now. It's messing up ARM asm printing. Also this significant debate about its efficiency.
...
llvm-svn: 76279
2009-07-18 01:43:53 +00:00
Reid Kleckner
5460ad390c
Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
...
Also a test commit.
llvm-svn: 76276
2009-07-18 00:42:18 +00:00
Dan Gohman
e45061eefe
Convert more code to use Operator instead of explicitly handling both
...
ConstantExpr and Instruction. This involves duplicating some code
between GetElementPtrInst and GEPOperator, but it's not a lot.
llvm-svn: 76265
2009-07-17 23:55:56 +00:00
Daniel Dunbar
ec0fd7ebe5
Add llvm::InitializeAllTargetInfos and llvm::InitializeAllAsmParsers.
...
llvm-svn: 76253
2009-07-17 22:35:35 +00:00
Chris Lattner
7cf9653432
remove AsmPrinter::findGlobalValue, just use Value::stripPointerCasts instead.
...
llvm-svn: 76246
2009-07-17 22:00:23 +00:00
Dan Gohman
c639ee66f0
Add a GEPOperator class, and move the hasNoPointerOverflow
...
accessors into it.
llvm-svn: 76245
2009-07-17 21:33:58 +00:00
Dan Gohman
b8ff7ff3cc
Commit this change, to accompany r76232.
...
llvm-svn: 76238
2009-07-17 21:03:54 +00:00
Dan Gohman
25a722cc45
Add a new Operator class, for handling Instructions and ConstantExprs
...
in a convenient manner, factoring out some common code from
InstructionCombining and ValueTracking. Move the contents of
BinaryOperators.h into Operator.h and use Operator to generalize them
to support ConstantExprs as well as Instructions.
llvm-svn: 76232
2009-07-17 20:47:02 +00:00