Chris Lattner
cba8b4c7e8
Make instcombine's DSE respect loads as well as stores. It is not safe to
...
delete the first store in:
store x -> p
load p
store y -> p
This is for PR2297.
llvm-svn: 50859
2008-05-08 17:20:30 +00:00
Chris Lattner
3c362081d5
add a new Instruction::mayReadFromMemory predicate, make
...
Instruction::mayWriteToMemory stronger for invokes.
llvm-svn: 50858
2008-05-08 17:16:51 +00:00
Devang Patel
3dce0e9d2e
Check linkage.
...
llvm-svn: 50851
2008-05-08 15:08:39 +00:00
Duncan Sands
5775b74165
Get exception handling working again on 64 bit
...
Darwin. This is a hack of course, but it does
at least look at the right thing: gotpcrel means
that this is already an offset, so an explicit
offset is not needed (and wrong). I think this
is good enough for the moment: Anton is working
on something better.
llvm-svn: 50850
2008-05-08 12:33:11 +00:00
Chris Lattner
9bf499a8b9
new testcase.
...
llvm-svn: 50841
2008-05-08 04:55:51 +00:00
Chris Lattner
9011ceba89
Add support for constant folding the 'offsetof' pattern even if the
...
base is not zero. This fixes test/C++Frontend/2008-05-07-CrazyOffsetOf.cpp
llvm-svn: 50840
2008-05-08 04:54:43 +00:00
Evan Cheng
f97e716511
Handle vector move / load which zero the destination register top bits (i.e. movd, movq, movss (addr), movsd (addr)) with X86 specific dag combine.
...
llvm-svn: 50838
2008-05-08 00:57:18 +00:00
Evan Cheng
7ff000c175
Add nounwind.
...
llvm-svn: 50837
2008-05-07 22:59:08 +00:00
Anton Korobeynikov
ddb93e7a02
Turn StripPointerCast() into a method
...
llvm-svn: 50836
2008-05-07 22:54:15 +00:00
Mikhail Glushenkov
7e401e5002
Use Doxygen-style comments.
...
llvm-svn: 50833
2008-05-07 21:50:19 +00:00
Ted Kremenek
1534cce257
Make the interface of CStrInCStrNoCase be the same as strcasestr.
...
llvm-svn: 50828
2008-05-07 20:04:18 +00:00
Chris Lattner
3ee18d7c51
Add a new LibCallAliasAnalysis pass, which is parameterized
...
by an instance of LibCallInfo to provide mod/ref info of
standard library functions. This is powerful enough to
say that 'sqrt' is readonly except that it modifies errno,
or that "printf doesn't store to memory unless the %n
constraint is present" etc.
llvm-svn: 50827
2008-05-07 19:53:05 +00:00
Ted Kremenek
b82fe559d6
Fix some serious logical errors in CStrInCStrNoCase pointed out by Bill.
...
llvm-svn: 50826
2008-05-07 19:22:36 +00:00
Duncan Sands
6f4e916c6a
Output correct exception handling and frame info
...
on x86-64 linux. This causes no regressions on
32 bit linux and 32 bit ppc. More tests pass
on 64 bit ppc with no regressions. I didn't
turn on eh on 64 bit linux because the intrinsics
needed to compile the eh runtime aren't done
yet. But if you turn it on and link with the
mainline runtime then eh seems to work fine
on x86-64 linux with this patch. Thanks to
Dale for testing. The main point of the patch
is that if you output that some object is
encoded using 4 bytes you had better not output
8 bytes for it: the patch makes everything
consistent.
llvm-svn: 50825
2008-05-07 19:11:09 +00:00
Ted Kremenek
cbaf12a084
Guard for empty strings in CStrInCStrNoCase.
...
llvm-svn: 50823
2008-05-07 18:49:31 +00:00
Ted Kremenek
535ed35152
Added CStrInCStrNoCase, a portable implementation of strcasestr.
...
llvm-svn: 50821
2008-05-07 18:35:46 +00:00
Chris Lattner
e70ff7b21c
Add a new interface for describing the behavior of library calls. This
...
Currently is sufficient to describe mod/ref behavior but will hopefully
eventually be extended for other purposes.
This isn't used by anything yet.
llvm-svn: 50820
2008-05-07 18:21:13 +00:00
Nick Lewycky
adfc627b77
Typo.
...
llvm-svn: 50805
2008-05-07 06:39:04 +00:00
Evan Cheng
c86c035346
Yet another nasty spiller bug.
...
%ecx = op
store %cl<kill>, (addr)
(addr) = op %al
It's not safe to unfold the last operand and eliminate store even though %cl is marked kill. It's a sub-register use which means one of its super-register(s) may be used below.
llvm-svn: 50794
2008-05-07 00:49:28 +00:00
Dan Gohman
6ea87fa437
Fix a bug in the ComputeMaskedBits logic for multiply.
...
llvm-svn: 50793
2008-05-07 00:35:55 +00:00
Bill Wendling
a7619e13ed
Make the use of the "noinline" attribute conditional on using GCC.
...
llvm-svn: 50789
2008-05-07 00:00:34 +00:00
Owen Anderson
3743bcf042
Disable loop deletion until the release branch.
...
llvm-svn: 50787
2008-05-06 23:56:34 +00:00
Bill Wendling
3cb8ee3c80
Removing.
...
llvm-svn: 50786
2008-05-06 23:56:22 +00:00
Bill Wendling
9d987912d6
Workaround for a compiler bug (see <rdar://problem/5852746>). Once that bug is
...
fixed, revert this patch.
llvm-svn: 50782
2008-05-06 23:30:02 +00:00
Steve Naroff
30440f5a20
Update a couple VC++ project files.
...
llvm-svn: 50780
2008-05-06 23:14:34 +00:00
Anton Korobeynikov
a9ff11ea5f
Use target triple in tests, not 'realign-stack=0' option. Per request.
...
llvm-svn: 50778
2008-05-06 23:09:29 +00:00
Anton Korobeynikov
ef80f5dbca
If weak GlobalVariable was bitcast'ed to different type during linking
...
we will need to strip all casts for intializer lookup.
llvm-svn: 50776
2008-05-06 22:52:54 +00:00
Anton Korobeynikov
90ee6d6616
Make StripPointerCast a common function (should we mak it method of Value instead?)
...
llvm-svn: 50775
2008-05-06 22:52:30 +00:00
Owen Anderson
2dccdcf2f2
Testcase for r50770.
...
llvm-svn: 50771
2008-05-06 21:01:34 +00:00
Owen Anderson
d82a778214
We need to update PHIs containing the exiting block, not the exit block. We really should come up with better names for these.
...
llvm-svn: 50770
2008-05-06 20:55:16 +00:00
Gordon Henriksen
464bfd405a
Improve documentation.
...
llvm-svn: 50768
2008-05-06 19:17:01 +00:00
Mikhail Glushenkov
b2547a6c28
Change from llvm::SmallSet<std::string> to llvm::StringMap<char>.
...
llvm-svn: 50766
2008-05-06 18:18:58 +00:00
Mikhail Glushenkov
24d085fee4
Add new edge property combinator: weight.
...
llvm-svn: 50765
2008-05-06 18:18:20 +00:00
Mikhail Glushenkov
ca50cc143c
Add a help string for the -c option
...
llvm-svn: 50764
2008-05-06 18:17:42 +00:00
Mikhail Glushenkov
7710d5fb19
Update documentation to reflect the current state of affairs.
...
llvm-svn: 50763
2008-05-06 18:17:19 +00:00
Mikhail Glushenkov
7e594e9a00
Some cosmetic changes (change some comments, move code around a bit).
...
llvm-svn: 50762
2008-05-06 18:16:52 +00:00
Mikhail Glushenkov
5a403195b3
Move test files around a bit - fixes the reported number of test cases.
...
llvm-svn: 50761
2008-05-06 18:16:20 +00:00
Mikhail Glushenkov
8eaf175d62
Refactoring: split the function CompilationGraph::Build() into two parts.
...
llvm-svn: 50760
2008-05-06 18:15:35 +00:00
Mikhail Glushenkov
3534026221
Use edge weights to choose the right linker based on input language names.
...
llvm-svn: 50759
2008-05-06 18:15:12 +00:00
Mikhail Glushenkov
7ea1b7e206
Add weights to graph edges. Choose between edges based on their weight.
...
llvm-svn: 50757
2008-05-06 18:14:24 +00:00
Mikhail Glushenkov
e2005cb90d
Remove the UnpackValues() function.
...
llvm-svn: 50756
2008-05-06 18:13:45 +00:00
Mikhail Glushenkov
78aa308f84
Add a --linker command-line option, make all tests pass.
...
llvm-svn: 50755
2008-05-06 18:13:00 +00:00
Mikhail Glushenkov
89e32fbe59
Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
...
llvm-svn: 50754
2008-05-06 18:12:03 +00:00
Mikhail Glushenkov
ffc7ee62c0
Add two (currently failing) tests.
...
llvm-svn: 50752
2008-05-06 18:11:21 +00:00
Mikhail Glushenkov
008827951e
Add -x option (like in gcc).
...
llvm-svn: 50750
2008-05-06 18:10:53 +00:00
Mikhail Glushenkov
dc50e8c5fa
Take object file as input and handle files with the same name correctly.
...
llvm-svn: 50749
2008-05-06 18:10:20 +00:00
Mikhail Glushenkov
c586c41085
Rename LLVMCCConfigurationEmitter to LLVMCConfigurationEmitter
...
llvm-svn: 50748
2008-05-06 18:09:29 +00:00
Mikhail Glushenkov
b70916c93f
Add output redirection, rename namespace llvmcc to namespace llvmc.
...
llvm-svn: 50746
2008-05-06 18:08:59 +00:00
Mikhail Glushenkov
e9c941de05
Make AutoGenerated.inc depend also on Tools.td and Common.td
...
llvm-svn: 50745
2008-05-06 18:08:12 +00:00
Mikhail Glushenkov
c5fb5c9d2a
Utilize topological sort in CompilationGraph::Build().
...
This makes more interesting graph topologies possible. Currently all tests pass,
but more testing is needed.
llvm-svn: 50744
2008-05-06 18:07:48 +00:00