Duncan Sands
926d062a48
Don't load values out of global constants with weak
...
linkage: the value may be replaced with something
different at link time. (Frontends that want to
allow values to be loaded out of weak constants can
give their constants weak_odr linkage).
llvm-svn: 67407
2009-03-20 21:53:29 +00:00
Dan Gohman
60cfa194d4
Simplify this code; use a while instead of an if and a do-while.
...
llvm-svn: 67400
2009-03-20 20:42:23 +00:00
Evan Cheng
0c629db2aa
For inline asm output operand that matches an input. Encode the input operand index in the high bits.
...
llvm-svn: 67387
2009-03-20 18:03:34 +00:00
Sanjiv Gupta
d5c51dc50c
Fixed comment for libcalls.
...
llvm-svn: 67373
2009-03-20 14:10:20 +00:00
Sanjiv Gupta
15d6146126
Fixed build warnings for unused variables.
...
llvm-svn: 67372
2009-03-20 13:49:20 +00:00
Sanjiv Gupta
19dc27b7cf
Reformatting. Inserted code comments. Cleaned interfaces.
...
Removed unncessary code. No functionality change.
llvm-svn: 67371
2009-03-20 13:42:20 +00:00
Sanjiv Gupta
5957bb99ba
Fixed the comment. No functionality change.
...
llvm-svn: 67370
2009-03-20 09:38:50 +00:00
Nick Lewycky
0561fdaaf7
Revert r67334 and r37349 which break "make check" on Linux.
...
llvm-svn: 67368
2009-03-20 07:56:31 +00:00
Chris Lattner
b18e8617be
Apply the patch requested in PR3846.
...
llvm-svn: 67364
2009-03-20 05:08:24 +00:00
Mon P Wang
6ac3a9ac9d
Added option to enable generating less precise mad (multiply addition)
...
for those architectures that support the instruction.
llvm-svn: 67363
2009-03-20 05:06:58 +00:00
Dan Gohman
0d6f464b57
The last use in a block that doesn't have successors
...
(return or unreachable) is a kill.
llvm-svn: 67357
2009-03-20 01:28:21 +00:00
Evan Cheng
681326464d
Fix typo's.
...
llvm-svn: 67349
2009-03-20 00:14:09 +00:00
Sebastian Redl
e4e5b1c2f2
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.
llvm-svn: 67347
2009-03-19 23:26:52 +00:00
Evan Cheng
f47c144bff
Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.
...
llvm-svn: 67335
2009-03-19 20:30:06 +00:00
Evan Cheng
d331946d5b
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).
...
llvm-svn: 67334
2009-03-19 20:27:23 +00:00
Misha Brukman
3c59ac1164
Renamed unittest files to have a consistent {Tt}est suffix.
...
llvm-svn: 67326
2009-03-19 19:09:48 +00:00
Dan Gohman
93776d5742
SADDO and UADDO are commutative.
...
llvm-svn: 67319
2009-03-19 18:53:45 +00:00
Dale Johannesen
672ef54d0f
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.
llvm-svn: 67311
2009-03-19 18:03:56 +00:00
Dan Gohman
c6899f6200
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.
llvm-svn: 67309
2009-03-19 17:29:04 +00:00
Dale Johannesen
1d76ebc9ed
Fix comment typo.
...
llvm-svn: 67307
2009-03-19 17:23:29 +00:00
Dale Johannesen
15de950459
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.
llvm-svn: 67306
2009-03-19 17:22:53 +00:00
Ted Kremenek
9ef6dfa745
Fix regression in 'tblgen -gen-clang-diags-defs': Emit the diagnostic kind instead of "DIAGNOSTICCONTROLLED".
...
llvm-svn: 67305
2009-03-19 17:18:09 +00:00
Chris Lattner
3181caa065
Fix PEI to not walk off the start of a block when an updated instruction
...
is the first in its block. This is PR3842.
llvm-svn: 67304
2009-03-19 17:15:43 +00:00
Duncan Sands
45d4adde66
Fix comment typo.
...
llvm-svn: 67302
2009-03-19 11:37:15 +00:00
Nick Lewycky
6ec09863f0
Fix a couple glaring whitespace issues. This file isn't internally consistent
...
either.
llvm-svn: 67288
2009-03-19 06:31:22 +00:00
Nick Lewycky
a0dcd7e173
Remove strange extra semicolons.
...
llvm-svn: 67287
2009-03-19 05:51:39 +00:00
Nate Begeman
0eed59a7df
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.
llvm-svn: 67286
2009-03-19 05:21:56 +00:00
Bruno Cardoso Lopes
3402d4260c
Added support for Mips O32 Calling Convention
...
llvm-svn: 67280
2009-03-19 02:12:28 +00:00
Ted Kremenek
37102cf84e
tblgen -gen-clang-diags-options: Output OptionTable entries in lexicographic
...
order.
llvm-svn: 67244
2009-03-18 21:36:46 +00:00
Ted Kremenek
60be2b0ef5
'tblgen -gen-clang-diags-options' now outputs the OptionTable:
...
static const WarningOption OptionTable[] = {
{"unused-macros", DIAGS(UnusedMacrosDiags)}
...
};
This table is not yet properly sorted.
llvm-svn: 67242
2009-03-18 21:28:47 +00:00
Ted Kremenek
4538eda544
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 };
llvm-svn: 67239
2009-03-18 21:16:16 +00:00
Chris Lattner
c9d1aa488c
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
llvm-svn: 67232
2009-03-18 20:36:45 +00:00
Bill Wendling
70b20a1209
These tests are now passing on Darwin because of r67139.
...
llvm-svn: 67215
2009-03-18 17:45:11 +00:00
Chris Lattner
6dce8d4135
aha, DAE does have to think about PHI nodes. Many thanks to "Dr Evil" (aka Duncan)
...
for pointing this out :)
llvm-svn: 67212
2009-03-18 16:48:45 +00:00
Chris Lattner
0542f9f1ba
Fix PR3826 - InstComb assert with vector shift, by not calling ComputeNumSignBits on a vector.
...
llvm-svn: 67211
2009-03-18 16:32:19 +00:00
Chris Lattner
e4f0e25d07
add an assertion to make it clear that PHI nodes are not allowed.
...
llvm-svn: 67210
2009-03-18 16:23:56 +00:00
Zhou Sheng
4e5f2198ff
Explicitly check for StoreInst, do not lose the chance to delete
...
unused loads or bitcasts.
llvm-svn: 67202
2009-03-18 12:48:48 +00:00
Zhou Sheng
fd26fc58bd
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.
llvm-svn: 67194
2009-03-18 10:13:08 +00:00
Rafael Espindola
4461c91700
Add -relocation-model=pic so that the test works
...
both in Linux and Darwin.
llvm-svn: 67191
2009-03-18 09:38:28 +00:00
Zhou Sheng
90fc23d03d
Fix a bug.
...
If I->use_empty(), this method should return false.
llvm-svn: 67180
2009-03-18 07:56:13 +00:00
Mon P Wang
3d7fb6738a
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.
llvm-svn: 67175
2009-03-18 06:24:04 +00:00
Evan Cheng
2a51157172
Add another test case for r64440.
...
llvm-svn: 67156
2009-03-18 02:43:01 +00:00
Evan Cheng
fab64fcb5d
xfail these tests for now.
...
llvm-svn: 67143
2009-03-18 00:44:45 +00:00
Chris Lattner
205380a4e4
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.
llvm-svn: 67142
2009-03-18 00:43:52 +00:00
Chris Lattner
7bef74e92f
Fix PR3807 by inserting 'insertelement' instructions in the normal dest of
...
an invoke instead of after the invoke (in its block), which is invalid.
llvm-svn: 67139
2009-03-18 00:31:45 +00:00
Bill Wendling
28358589ec
A more proper -mtriple.
...
llvm-svn: 67138
2009-03-18 00:19:44 +00:00
Bill Wendling
8ec55afd27
Temporary fix. I think Rafael wanted this to be Linux-only.
...
llvm-svn: 67137
2009-03-18 00:16:36 +00:00
Chris Lattner
ee2d69fc7b
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
llvm-svn: 67134
2009-03-17 23:58:30 +00:00
Rafael Espindola
6a6d9e48dd
Don't force promotion of return arguments on the callee.
...
Some architectures (like x86) don't require it.
This fixes bug 3779.
llvm-svn: 67132
2009-03-17 23:43:59 +00:00
Daniel Dunbar
7c9dba0950
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.
llvm-svn: 67103
2009-03-17 21:15:18 +00:00