Commit Graph

60542 Commits

Author SHA1 Message Date
Chris Lattner
775aba2495 Simplify by using startswith instead of substr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103430 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:58:42 +00:00
Chris Lattner
fd450c026a fix PR7105 by enumerating MDNodes on all @llvm.foo
function calls, not just recognized intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103428 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:53:17 +00:00
Chris Lattner
c279243128 fix a pretty obvious typo. We test things before committing them, right?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103427 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:51:06 +00:00
David Greene
e89f1c4ee7 Fix PR6875:
This includes a patch by Roman Divacky to fix the initial crash.

Move the actual addition of passes from *PassManager::add to
*PassManager::addImpl.  That way, when adding printer passes we won't
recurse infinitely.

Finally, check to make sure that we are actually adding a FunctionPass
to a FunctionPassManager before doing a print before or after it.
Immutable passes are strange in this way because they aren't
FunctionPasses yet they can be and are added to the FunctionPassManager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103425 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:24:27 +00:00
Dan Gohman
da24b34c9a Add an explicit keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103424 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:14:02 +00:00
Daniel Dunbar
dd464df687 Add new configure option, --disable-timestamps, intended to turn off anything which would mess up binary/object comparisons. Currently:
- Disables 'Built on ...' in 'foo --version'.
 - Disables timestamps from being embedded into .dir files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103423 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:11:56 +00:00
Dan Gohman
faa19c32a2 Fix whitespace in debug output to be consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103422 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:07:44 +00:00
Dan Gohman
dbc56bbf75 Delete an obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 19:47:21 +00:00
Evan Cheng
aad753bbbd Be careful with operand promotion. For a binary operation, the source operands may be the same. PR7018. rdar://7939869.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103419 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 19:03:57 +00:00
Devang Patel
1deea21e35 Test case for 103414.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103415 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 17:49:40 +00:00
Evan Cheng
603afbfe2a Model vld2 / vst2 with reg_sequence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 17:34:18 +00:00
Evan Cheng
623d3c10e1 Re-defined valno is always valno even for partial re-def's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 17:33:49 +00:00
Bob Wilson
fde18e5eff Fix PR7096. When a block containing multiple defs is tail duplicated, the
SSAUpdater for the value from the first def may see uses of undefined values,
because the later defs will not have been updated yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103407 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 17:14:26 +00:00
Kalle Raiskila
26c4cf4c6f Fix encoding of 'sf' and 'sfh' instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 08:13:49 +00:00
Kalle Raiskila
faa95763eb Add command line option --gcc to bugpoint.
Remove sending duplicate of the --gcc-tool-args parameters to gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103397 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 07:38:37 +00:00
Duncan Sands
ad017dcb3a Add an assertion to catch attempts to access off the end of the array.
Based on a patch by Javier Martinez.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103391 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 04:54:28 +00:00
Chris Lattner
7505faf225 remove a dead file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103383 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-09 17:34:13 +00:00
Nathan Jeffords
bb59732d18 updated handling dllexport in X86AsmPrinter
changed dllexport code to use EmitBytes instead of EmitRawText, and changed the export option to use /EXPORT: instead of -export: on the windows platform

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103377 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-09 08:40:06 +00:00
Nathan Jeffords
071de920a0 made COFF target dllexport logic apply to all subtargets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103373 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-09 05:52:28 +00:00
Nathan Jeffords
72e57f9441 test commit, added a comment to MCSectionCOFF::PrintSwitchToSection function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103372 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-09 05:49:00 +00:00
Chris Lattner
c7d7e0cbe0 make simplifycfg insert an llvm.trap before the 'unreachable' it introduces
when it detects undefined behavior.  llvm.trap generally codegens into some
thing really small (e.g. a 2 byte ud2 instruction on x86) and debugging this
sort of thing is "nontrivial".  For example, we now compile:

void foo() { *(int*)0 = 42; }

into:

_foo:
	pushl	%ebp
	movl	%esp, %ebp
	ud2

Some may even claim that this is a security hole, though that seems dubious
to me.  This addresses rdar://7958343 - Optimizing away null dereference 
potentially allows arbitrary code execution


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103356 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 22:15:59 +00:00
Chris Lattner
6745191070 Teach instcombine to transform a bitcast/(zext|trunc)/bitcast sequence
with a vector input and output into a shuffle vector.  This sort of 
sequence happens when the input code stores with one type and reloads
with another type and then SROA promotes to i96 integers, which make
everyone sad.

This fixes rdar://7896024



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103354 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 21:50:26 +00:00
Chris Lattner
7944c21cae Fix PR7052, patch by Jakub Staszak!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103347 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 20:01:44 +00:00
Chris Lattner
b54b9ddaaf break coff symbol definition stuff out into proper MCStreamer callbacks,
patch by Nathan Jeffords!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103346 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 19:54:22 +00:00
Bill Wendling
369252db2e Readd testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103335 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 04:47:54 +00:00
Daniel Dunbar
d547708976 Run interrupt routines as part of report_fatal_error, since we are failing
ungracefully.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103334 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 02:10:36 +00:00
Daniel Dunbar
fb89e08413 Add llvm::sys::RunInterruptHandlers(), which runs the registered SIGINT cleanup
stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103333 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 02:10:34 +00:00
Dan Gohman
59dc60337f When pruning candidate formulae out of an LSRUse, update the
LSRUse's Regs set after all pruning is done, rather than trying
to do it on the fly, which can produce an incomplete result.

This fixes a case where heuristic pruning was stripping all
formulae from a use, which led the solver to enter an infinite
loop.

Also, add a few asserts to diagnose this kind of situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103328 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:36:59 +00:00
Devang Patel
c665a5146d Instead of just verifying compile unit, verify entire type, variable, namespace etc..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103327 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:33:41 +00:00
Devang Patel
a49d877290 Remove DIGlobal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103325 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:19:07 +00:00
Bill Wendling
09e7a1722a Remove. Don't XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103321 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:09:17 +00:00
Devang Patel
47e2265a30 Add DINameSpace::Verify().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103318 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:04:32 +00:00
Bill Wendling
20eb256006 Temorarily revert r101984.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103314 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 22:45:36 +00:00
Douglas Gregor
2be6e6d59c Clang is dying on this with an ambiguous conversion sequence. We're working on it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103312 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 22:28:25 +00:00
Dan Gohman
4ce86f459c SDDbgValues are apparently not being legalized. Fix a symptom of the problem,
and not the real problem itself, by dropping debug info for i128 values.
rdar://7958162.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103310 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 22:19:08 +00:00
Dan Gohman
66797ff2e1 Minimally fix this code to not abort on mdnodes with integer data
wider than 64 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103309 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 22:15:24 +00:00
Devang Patel
02f0dbd97a Verify variable directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103305 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 22:04:20 +00:00
Chris Lattner
6e5ce287b0 add COFF support for COMDAT sections, patch by Nathan Jeffords!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103304 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:49:09 +00:00
Devang Patel
9c00487dc3 Verify entire type descriptor not just tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103303 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:45:47 +00:00
Kevin Enderby
a6eeb6e226 Fix i386 relocations to Weak Definitions. The relocation entries should be
external and the item to be relocated should not have the address of the
symbol added in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:44:23 +00:00
Devang Patel
62077af40e Verify compile unit also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:42:24 +00:00
Dale Johannesen
0a406ae0d9 Fix PR 7087, and probably other things, by extending
getConstantFP to accept the two supported long double
target types.  This was not the original intent, but
there are other places that assume this works and it's
easy enough to do.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:35:53 +00:00
Devang Patel
e9f8f5e600 Wrap const MDNode * inside DIDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103295 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 20:54:48 +00:00
Devang Patel
735538b3eb Update test to use valid debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103287 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 20:34:00 +00:00
Devang Patel
ebe57f1b30 remove DIDescriptor::getNode()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 18:36:34 +00:00
Jim Grosbach
4b77f6a85a Clean up the conditional for handling of sign_extend_inreg based on
whether the extract instructions are available.

rdar://7956878



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103277 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 18:34:55 +00:00
Devang Patel
ed66bf5125 Use overloaded operators instead of DIDescriptor::getNode()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103276 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 18:19:32 +00:00
Devang Patel
2db49d797b Avoid DIDescriptor::getNode(). Use overloaded operators instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103272 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 18:11:54 +00:00
Kalle Raiskila
021b5ef903 Testing svn access with a note added to documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103271 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 18:06:28 +00:00
Ted Kremenek
d51409ae9e Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103269 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 17:29:48 +00:00