Commit Graph

48864 Commits

Author SHA1 Message Date
Chris Lattner
a9af7e626c rename test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76197 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:05:55 +00:00
Bruno Cardoso Lopes
b674dbe656 revert one of the loops to use indicies over iterators because there are vector insertions inside the loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:02:30 +00:00
Dan Gohman
9491c16e14 Add a SubclassOptionalData field to Value. See the doxygen comment for
details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 17:16:59 +00:00
Daniel Dunbar
445c89a83c Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76186 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 16:41:57 +00:00
Daniel Dunbar
ff8ac551a7 Initialize another Context, in the hopes of unbreaking CBE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 16:20:23 +00:00
Dan Gohman
a62b5eded6 Fix an apparent typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 16:12:36 +00:00
David Greene
5024246167 Make DOUT an lvalue in release mode so that developers may use DOUT in
their code in release mode.  This helps to debug release-mode problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 15:55:53 +00:00
Daniel Dunbar
7df0c07dbc Provide slightly more refined error message when trying to lookup a target, and
none are registered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 15:50:49 +00:00
David Greene
ab9238e876 Add logic to align instruction operands to columns for pretty-printing.
No target uses this currently.  This patch only adds the mechanism so
that local installations can choose to enable this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 14:24:46 +00:00
Duncan Sands
3e11988c42 Avoid a compiler warning when assertions are turned off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76176 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 12:25:14 +00:00
Duncan Sands
cbc6da628a Testcase for PR4214.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 11:44:20 +00:00
Eli Friedman
8b7d706c80 Documentation clarifications for isSafeToSpeculativelyExecute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76168 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 08:38:29 +00:00
Eli Friedman
d8f7a36270 Oops, accidentally set a legal operation to expand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 07:34:23 +00:00
Eli Friedman
e4ce880dfa Expand misc operations from test/CodeGen/Generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 07:28:06 +00:00
Eli Friedman
ed224949ed Handle void in XCoreTargetLowering::isLegalAddressingMode. Triggers in
test/CodeGen/Generic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 07:16:38 +00:00
Eli Friedman
e91bf2c993 Remove some unnecessary expansion markings. Add a few expansion
markings that show up in test/CodeGen/Generic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76160 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 07:03:00 +00:00
Eli Friedman
5427d71be8 Add operation expansion/promotion for a bunch of operations, many of
which show up in test/CodeGen/Generic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76158 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 06:36:24 +00:00
Nick Lewycky
3bf2d0391f Add broken gcc from PR4532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76157 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 06:32:10 +00:00
Evan Cheng
a6e4322ccc Fix tSUBspi operand definition. It reads and writes sp, which is a high register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76155 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 05:43:12 +00:00
Eli Friedman
18d643abe5 Set an operation expansion, noticed while running
llc over test/CodeGen/Generic with -march=alpha.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76154 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 05:23:03 +00:00
Eli Friedman
a64eb92fe3 Make promotion in operation legalization for SETCC work correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 05:16:04 +00:00
Eli Friedman
0b79a7727d Replace isTrapping with a new, similar method called
isSafeToSpeculativelyExecute. The new method is a bit closer to what 
the callers actually care about in that it rejects more things callers 
don't want.  It also adds more precise handling for integer 
division, and unifies code for analyzing the legality of a speculative 
load.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 04:28:42 +00:00
Eli Friedman
6055a6adb7 One more operation expansion for MIPS, from test/CodeGen/Generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76149 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 04:07:24 +00:00
Daniel Dunbar
53448652e4 Make sure CWriter's Context get's initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76147 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 03:43:21 +00:00
Eli Friedman
10a3659101 Expand a bunch of illegal operations on MIPS (found by
inspection and running over CodeGen/Generic).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 02:28:12 +00:00
Daniel Dunbar
19c29f53f2 Fix 'may be used uninitialized' warning.
- Anton, please review.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 02:19:26 +00:00
Dan Gohman
923a579b55 Add the private keyword to the polygen grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76135 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 01:07:45 +00:00
Dan Gohman
21de024b90 Add the private keyword to the VIM syntax highlighting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 01:06:53 +00:00
Evan Cheng
c1b46f91f5 Fix my brain cramp by inverting the assertion condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 00:32:06 +00:00
Jeffrey Yasskin
28ebfcf7de Fix "no newline at end of file" warning from gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 23:58:14 +00:00
Owen Anderson
ce032b483c Privatize the MDNode uniquing table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 23:44:30 +00:00
Anton Korobeynikov
b8e9ac834a Emit cross regclass register moves for thumb2.
Minor code duplication cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76124 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 23:26:06 +00:00
Daniel Dunbar
2df5e554e2 Disable this assert for now, it is firing on an llvm-gcc bootstrap. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76123 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 23:02:46 +00:00
Bill Wendling
49e3182c97 Add new flags '-test-cflags' and '-test-cxxflags' to pass in flags directly to the llvm testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:59:17 +00:00
Evan Cheng
a82b22c667 GV with ghost linkage (module being lazily streamed in in JIT lazy compilation mode) do not require extra load from stub. This fixes ExecutionEngine/2005-12-02-TailCallBug.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76121 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:53:10 +00:00
Dale Johannesen
423ccfe51d Assume an inline asm might be a call, so we get
stack alignment right when it is.  This is not
ideal but conservatively correct.  Adjust a test
to compensate for changed stack offset value.
gcc.apple/asm-block-57.c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76120 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:34:45 +00:00
David Greene
3ac1ab835c Emit line numbers in asm comments when available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:24:20 +00:00
Owen Anderson
aad3fb7362 Privatize the MDString uniquing table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:11:26 +00:00
Daniel Dunbar
24cd3c4711 Fix inverted preprocessor conditional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:08:25 +00:00
Daniel Dunbar
efd280b4ca Fix compiler warning (for -Asserts).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:06:22 +00:00
Jakob Stoklund Olesen
93e55deeba Silence warning in Linux builds:
X86InstrInfo.cpp:2272: warning: suggest explicit braces to avoid ambiguous 'else'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76105 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 21:24:13 +00:00
Daniel Dunbar
34ccf037fe Add raw_null_ostream and llvm::nulls(), a raw_ostream that discards output.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 21:17:53 +00:00
Jeffrey Yasskin
32360a7e21 Add line numbers to OProfile. To do this, I added a processDebugLoc()
call to the MachineCodeEmitter interface and made copying the start
line of a function not conditional on whether we're emitting Dwarf
debug information. I'll propagate the processDebugLoc() calls to the
non-X86 targets in a followup patch.

In the long run, it'll probably be better to gather this information
through the DwarfWriter, but the DwarfWriter currently depends on the
AsmPrinter and TargetAsmInfo, and fixing that would be out of the way
for this patch.

There's a bug in OProfile 0.9.4 that makes it ignore line numbers for
addresses above 4G, and a patch fixing it at
http://thread.gmane.org/gmane.linux.oprofile/7634

Sample output:

$ sudo opcontrol --reset; sudo opcontrol --start-daemon; sudo opcontrol --start; `pwd`/Debug/bin/lli fib.bc; sudo opcontrol --stop
Signalling daemon... done
Profiler running.
fib(40) == 165580141
Stopping profiling.

$ opreport -g -d -l `pwd`/Debug/bin/lli|head -60
Overflow stats not available
CPU: Core 2, speed 1998 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
vma      samples  %        linenr info                 image name               symbol name
00007f67a30370b0 25489    61.2554  fib.c:24                    10946.jo                 fib_left
  00007f67a30370b0 1634      6.4106  fib.c:24
  00007f67a30370b1 83        0.3256  fib.c:24
  00007f67a30370b9 1997      7.8348  fib.c:24
  00007f67a30370c6 2080      8.1604  fib.c:27
  00007f67a30370c8 988       3.8762  fib.c:27
  00007f67a30370cd 1315      5.1591  fib.c:27
  00007f67a30370cf 251       0.9847  fib.c:27
  00007f67a30370d3 1191      4.6726  fib.c:27
  00007f67a30370d6 975       3.8252  fib.c:27
  00007f67a30370db 1010      3.9625  fib.c:27
  00007f67a30370dd 242       0.9494  fib.c:27
  00007f67a30370e1 2782     10.9145  fib.c:28
  00007f67a30370e5 3768     14.7828  fib.c:28
  00007f67a30370eb 615       2.4128  (no location information)
  00007f67a30370f3 6558     25.7287  (no location information)
00007f67a3037100 15603    37.4973  fib.c:29                    10946.jo                 fib_right
  00007f67a3037100 1646     10.5493  fib.c:29
  00007f67a3037101 45        0.2884  fib.c:29
  00007f67a3037109 2372     15.2022  fib.c:29
  00007f67a3037116 2234     14.3178  fib.c:32
  00007f67a3037118 612       3.9223  fib.c:32
  00007f67a303711d 622       3.9864  fib.c:32
  00007f67a303711f 385       2.4675  fib.c:32
  00007f67a3037123 404       2.5892  fib.c:32
  00007f67a3037126 634       4.0633  fib.c:32
  00007f67a303712b 870       5.5759  fib.c:32
  00007f67a303712d 62        0.3974  fib.c:32
  00007f67a3037131 1848     11.8439  fib.c:33
  00007f67a3037135 2840     18.2016  fib.c:33
  00007f67a303713a 1         0.0064  fib.c:33
  00007f67a303713b 1023      6.5564  (no location information)
  00007f67a3037143 5         0.0320  (no location information)
000000000080c1e4 15        0.0360  MachineOperand.h:150        lli                      llvm::MachineOperand::isReg() const
  000000000080c1e4 6        40.0000  MachineOperand.h:150
  000000000080c1ec 2        13.3333  MachineOperand.h:150
...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 21:07:26 +00:00
Jakob Stoklund Olesen
57e599a46b Teach MachineInstr::isRegTiedToDefOperand() to correctly parse inline asm operands.
The inline asm operands must be parsed from the first flag, you cannot assume
that an immediate operand preceeding a register use operand is the flag.
PowerPC "m" operands are represented as (flag, imm, reg) triples.
isRegTiedToDefOperand() would incorrectly interpret the imm as the flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 20:58:34 +00:00
Evan Cheng
5f15992b77 Changed my mind. We now allow remat of instructions whose defs have subreg indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 20:15:00 +00:00
Owen Anderson
914e50c841 Privatize the ConstantFP table. I'm on a roll!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 19:05:41 +00:00
Chris Lattner
dfce360306 this should be xfailed on darwin. Darwin doesn't use the libstdc++ in the llvm-gcc distro, it uses the system version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76095 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 18:45:51 +00:00
Evan Cheng
2b48ab947c With recent MC changes, RIP base register is explicitly modeled. Make sure we add it when x86 V_SET0 / V_SETALLONES (by transforming it into a constpool load) into the use instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76094 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 18:44:05 +00:00
Ted Kremenek
da24fe265a Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 18:29:22 +00:00
Owen Anderson
001dbfebcb Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
our current context-passing stuff, which is also fixed here


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 18:04:31 +00:00