Commit Graph

45486 Commits

Author SHA1 Message Date
Sebastian Redl
48fe63526e Fix the Win32 VS2008 build:
- Make type declarations match the struct/class keyword of the definition.
 - Move AddSignalHandler into the namespace where it belongs.
 - Correctly call functions from template base.
 - Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 23:26:52 +00:00
Evan Cheng
a24752ff43 Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67335 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 20:30:06 +00:00
Evan Cheng
817046e1f1 More makefile changes to allow dejagnu tests to pass when system tools default to a different target from the llvm configuration (e.g. 64-bit gcc and 32-bit llvm).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67334 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 20:27:23 +00:00
Misha Brukman
8be1ac213b Renamed unittest files to have a consistent {Tt}est suffix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67326 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 19:09:48 +00:00
Dan Gohman
56e04a80b3 SADDO and UADDO are commutative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67319 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 18:53:45 +00:00
Dale Johannesen
1f67ce4aa3 Clear the cached cost when removing a function in
the inliner; prevents nondeterministic behavior
when the same address is reallocated.
Don't build call graph nodes for debug intrinsic calls;
they're useless, and there were typically a lot of them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 18:03:56 +00:00
Dan Gohman
3751f564e3 Add a liveness analysis pass for LLVM IR values. This computes
the set of blocks in which values are used, the set in which
values are live-through, and the set in which values are
killed. For the live-through and killed sets, conservative
approximations are used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67309 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 17:29:04 +00:00
Dale Johannesen
f33b1103a1 Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67307 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 17:23:29 +00:00
Dale Johannesen
f4978e2094 This pass keeps a map of Instructions to Rank numbers,
and was deleting Instructions without clearing the
corresponding map entry.  This led to nondeterministic
behavior if the same address got allocated to another
Instruction within a short time.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67306 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 17:22:53 +00:00
Ted Kremenek
7fae82f67a Fix regression in 'tblgen -gen-clang-diags-defs': Emit the diagnostic kind instead of "DIAGNOSTICCONTROLLED".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67305 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 17:18:09 +00:00
Chris Lattner
5e6345bde0 Fix PEI to not walk off the start of a block when an updated instruction
is the first in its block.  This is PR3842.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67304 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 17:15:43 +00:00
Duncan Sands
bf5836b075 Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67302 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 11:37:15 +00:00
Nick Lewycky
042348343e Fix a couple glaring whitespace issues. This file isn't internally consistent
either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 06:31:22 +00:00
Nick Lewycky
9c0f146d50 Remove strange extra semicolons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67287 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 05:51:39 +00:00
Nate Begeman
7cee81703d Add support to tablegen for naming the nodes themselves, not just the operands,
in selectiondag patterns.  This is required for the upcoming shuffle_vector rewrite,
and as it turns out, cleans up a hack in the Alpha instruction info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67286 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 05:21:56 +00:00
Bruno Cardoso Lopes
b53db4fb32 Added support for Mips O32 Calling Convention
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67280 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 02:12:28 +00:00
Ted Kremenek
0f9d510193 tblgen -gen-clang-diags-options: Output OptionTable entries in lexicographic
order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 21:36:46 +00:00
Ted Kremenek
3ac82fe490 'tblgen -gen-clang-diags-options' now outputs the OptionTable:
static const WarningOption OptionTable[] = {
    {"unused-macros", DIAGS(UnusedMacrosDiags)}
    ...
  };

This table is not yet properly sorted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67242 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 21:28:47 +00:00
Ted Kremenek
8b9d027701 Add another Clang TableGen-backend (-gen-clang-diags-options) for emitting
declarations for controlling groups of warnings. Currently this transforms:

  def UnusedMacrosDiags : Option<"unused-macros", [pp_macro_not_used]>;
  
into:

  static const diag::kind UnusedMacrosDiags[] = { diag::pp_macro_not_used };



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 21:16:16 +00:00
Chris Lattner
d4771828ca include the null at the end of a memorybuffer as part of the buffer.
This allows tblgen to handle include "foo.td" when the quote is exactly
the last character in a file.  rdar://6695728


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67232 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 20:36:45 +00:00
Bill Wendling
f10929dd31 These tests are now passing on Darwin because of r67139.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67215 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 17:45:11 +00:00
Chris Lattner
a5affdcf4c aha, DAE does have to think about PHI nodes. Many thanks to "Dr Evil" (aka Duncan)
for pointing this out :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67212 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 16:48:45 +00:00
Chris Lattner
b44b3666f9 Fix PR3826 - InstComb assert with vector shift, by not calling ComputeNumSignBits on a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67211 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 16:32:19 +00:00
Chris Lattner
f023b54bcd add an assertion to make it clear that PHI nodes are not allowed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 16:23:56 +00:00
Zhou Sheng
b0c4199a55 Explicitly check for StoreInst, do not lose the chance to delete
unused loads or bitcasts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67202 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 12:48:48 +00:00
Zhou Sheng
16767c6b49 Revert my previous change on Local.cpp, instead, fix the bug on scalarrepl.
If the instruction has no users, it is also not only used by debug info 
and should not be deleted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 10:13:08 +00:00
Rafael Espindola
6b2c7ae2c9 Add -relocation-model=pic so that the test works
both in Linux and Darwin.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 09:38:28 +00:00
Zhou Sheng
df95a2f6a9 Fix a bug.
If I->use_empty(), this method should return false.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 07:56:13 +00:00
Mon P Wang
aa9df0b0c3 Added missing support for widening when splitting an unary op (PR3683)
and expanding a bit convert (PR3711).  In both cases, we extract the
valid part of the widen vector and then do the conversion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 06:24:04 +00:00
Evan Cheng
7367319991 Add another test case for r64440.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 02:43:01 +00:00
Evan Cheng
13ca4879d5 xfail these tests for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67143 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 00:44:45 +00:00
Chris Lattner
ff81ebf758 Disable the "call to immediate" optimization on x86-64. It is
not safe in general because the immediate could be an arbitrary
value that does not fit in a 32-bit pcrel displacement.  
Conservatively fall back to loading the value into a register
and calling through it.

We still do the optzn on X86-32.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67142 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 00:43:52 +00:00
Chris Lattner
bda0765e07 Fix PR3807 by inserting 'insertelement' instructions in the normal dest of
an invoke instead of after the invoke (in its block), which is invalid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67139 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 00:31:45 +00:00
Bill Wendling
64ec298e68 A more proper -mtriple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 00:19:44 +00:00
Bill Wendling
652c3c36c5 Temporary fix. I think Rafael wanted this to be Linux-only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67137 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 00:16:36 +00:00
Chris Lattner
b7e64ac3ac LSR shouldn't ever try to hack on integer IV's larger than 64-bits. Right now
it is not APInt clean, but even when it is it needs to be evaluated carefully
to determine whether it is actually profitable.

This fixes a crash on PR3806


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 23:58:30 +00:00
Rafael Espindola
152932b71c Don't force promotion of return arguments on the callee.
Some architectures (like x86) don't require it.
This fixes bug 3779.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 23:43:59 +00:00
Daniel Dunbar
b372c1114c Add BUILTIN_EXPECT Support/Compiler macro.
- Use for exceptional buffer conditions in raw_ostream:write to shave
   off a cycle or two.

 - Please rename if you have a better one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 21:15:18 +00:00
Chris Lattner
3985728bde this is apparently passing now. Evan/Dan, please check
to see if this is producing the expected code or not, I'm
not sure what the test was intended to check.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 20:23:43 +00:00
Devang Patel
203b279f5f test case for rev. 67095.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67096 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 19:47:21 +00:00
Chris Lattner
0b18e59336 Fix codegen to compute the size of an allocation by multiplying the
size by the array amount as an i32 value instead of promoting from
i32 to i64 then doing the multiply.  Not doing this broke wrap-around
assumptions that the optimizers (validly) made.  The ultimate real
fix for this is to introduce i64 version of alloca and remove mallocinst.

This fixes PR3829


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 19:36:00 +00:00
Chris Lattner
46d232d4bc Remove a condition which is always true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 17:55:15 +00:00
Evan Cheng
58e2287d00 Add newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67085 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 17:08:25 +00:00
Scott Michel
a82d3f7c57 CellSPU:
Revert inadvertent mis-fix of fneg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 16:45:16 +00:00
Daniel Dunbar
501adac7aa Minimal raw_ostream unit tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 16:14:59 +00:00
Sanjiv Gupta
12a9dc8c14 r66870 missed this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 15:46:15 +00:00
Gabor Greif
e14ad7220d typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67080 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 11:38:29 +00:00
Duncan Sands
a5fec0dba3 Reapply r67049, with the test adjusted for darwin
(which produces "call L_f$stub" rather than "call f").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 09:46:22 +00:00
Mon P Wang
93b7415f4c Fix a problem with DAGCombine where we were building an illegal build
vector shuffle mask. Forced the mask to be built using i32.  Note: this will
be irrelevant once vector_shuffle no longer takes a build vector for the
shuffle mask.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67076 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 06:33:10 +00:00
Dan Gohman
9626447e70 Recognize bswapl as bswap too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67072 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 02:45:40 +00:00