Commit Graph

77442 Commits

Author SHA1 Message Date
Ted Kremenek a0032da389 Convert flags in FormatSpecifier to be bitfields instead of doing
direct bit manipulation.  This is is less error prone, and fixes a bug
in the handling of the LeadingZeroes flag as pointed out by Cristian
Draghici.

llvm-svn: 95298
2010-02-04 07:27:39 +00:00
Ted Kremenek fc8dbdf3c7 Add assorted test cases from PR 4172.
llvm-svn: 95297
2010-02-04 07:25:56 +00:00
Chris Lattner f3c6b5008a fix a broken archive that was breaking dejagnu only (not lit)
after r95292 

llvm-svn: 95296
2010-02-04 07:11:08 +00:00
Evan Cheng aeba2250a5 Re-enable x86 tail call optimization.
llvm-svn: 95295
2010-02-04 06:47:24 +00:00
Eric Christopher 107a1fbf61 Temporarily revert this since it appears to have caused a build
failure.

llvm-svn: 95294
2010-02-04 06:41:27 +00:00
Chris Lattner 8228b11abc add support for the sparcv9-*-* target triple to turn on
64-bit sparc codegen.  Patch by Nathan Keynes!

llvm-svn: 95293
2010-02-04 06:34:01 +00:00
Chris Lattner 21fb024cc0 From PR6228:
"Attached patch removes the extra NUL bytes from the output and changes
test/Archive/MacOSX.toc from a binary to a text file (removes
svn:mime-type=application/octet-stream and adds svn:eol-style=native).  I can't
figure out how to get SVN to include the new contents of the file in the patch
so I'm attaching it separately."

Patch by James Abbatiello!

llvm-svn: 95292
2010-02-04 06:19:43 +00:00
John McCall cddbad000d Allow calling convention attributes to apply to types. Patch by Chip Davis!
llvm-svn: 95291
2010-02-04 05:44:44 +00:00
Zhongxing Xu 319deb83d2 Cast evaluation no longer touch GRState.
llvm-svn: 95290
2010-02-04 04:56:43 +00:00
Ted Kremenek 49f878524c Specially handle casts to 'void' in AdjustedReturnValueChecker.
llvm-svn: 95287
2010-02-04 04:18:55 +00:00
Ted Kremenek 33617e055a Remove stray typo.
llvm-svn: 95286
2010-02-04 04:14:49 +00:00
John McCall d061b4429e Mangle member expressions. Also invented.
llvm-svn: 95284
2010-02-04 02:56:29 +00:00
Eric Christopher 42fa84a880 Rework constant expr and array handling for objectsize instcombining.
Fix bugs where we would compute out of bounds as in bounds, and where
we couldn't know that the linker could override the size of an array.

Add a few new testcases, change existing testcase to use a private
global array instead of extern.

llvm-svn: 95283
2010-02-04 02:55:34 +00:00
Evan Cheng 01676f9ff4 It's too risky to eliminate sext / zext of call results for tail call optimization even if the caller / callee attributes completely match. The callee may have been bitcast'ed (or otherwise lied about what it's doing).
llvm-svn: 95282
2010-02-04 02:45:02 +00:00
Dan Gohman 9946b5109c Change the argument to getIntegerSCEV to be an int64_t, rather
than int. This will make it more convenient for LSR, which does
a lot of things with int64_t offsets.

llvm-svn: 95281
2010-02-04 02:43:51 +00:00
Evan Cheng 9976832a05 Indirect tail call has to go through a call preserved register since it's after callee register pops. X86 isel lowering is using EAX / R11 and it was somehow adding that to function live out. That prevented the real function return register from being added to the function live out list and bad things happen.
This fixes 483.xalancbmk (with tail call opt).

llvm-svn: 95280
2010-02-04 02:40:39 +00:00
Zhongxing Xu 4f8b9899bb Now that CastRetrievedVal returns SVal, there is no need to use CastResult.
llvm-svn: 95279
2010-02-04 02:39:47 +00:00
John McCall 11ef09f8b5 Add a cautionary note about the mangling I just invented.
llvm-svn: 95275
2010-02-04 01:48:38 +00:00
Sean Callanan 9eb8d6fb43 Filled in a few new APIs for the enhanced
disassembly library that provide access to
instruction information, and fixed ambiguous
wording in the comments for the header.

llvm-svn: 95274
2010-02-04 01:43:08 +00:00
John McCall 09de8ecd88 Add mangling support for calls, sizeof/alignof, constructor calls,
float literals, and unresolved lookups (which required hand-wavey extensions).

llvm-svn: 95273
2010-02-04 01:42:13 +00:00
Dan Gohman 77fe07a93a Use a tab instead of space after .type, for consistency.
llvm-svn: 95272
2010-02-04 01:42:13 +00:00
Dale Johannesen c337d6538a Rewrite FP constant handling in DEBUG_VALUE yet
again, so it more or less handles long double.
Restore \n removed in latest MC frenzy.

llvm-svn: 95271
2010-02-04 01:33:43 +00:00
Victor Hernandez d44ee35f30 Fix (and test) function-local metadata that occurs before the instruction that it refers to; fix is to not enumerate operands of function-local metadata until after all instructions have been enumerated
llvm-svn: 95269
2010-02-04 01:13:08 +00:00
Ted Kremenek 1e3b95580c static analyzer: handle casts of a function to a function pointer with
a different return type.  While we don't emit any errors (yet), at
least we avoid cases where we might crash because of an assertion
failure later on (when the return type differs from what is expected).

llvm-svn: 95268
2010-02-04 00:47:48 +00:00
Fariborz Jahanian b8355e3b9f Fix rewriting of 'const' __block variables in
the rewriter. (Fixes radar 7607781).

llvm-svn: 95267
2010-02-04 00:07:58 +00:00
Eric Christopher f12e18db21 If we're dealing with a zero-length array, don't lower to any
particular size, we just don't know what the length is yet.

llvm-svn: 95266
2010-02-03 23:56:07 +00:00
Dale Johannesen e5177e685c This test passes now on ppc darwin; if it doesn't pass
on some other ppc say something on the list.

llvm-svn: 95265
2010-02-03 22:33:17 +00:00
Dale Johannesen c5df1559ca This test passes now on ppc darwin, so reenable it.
llvm-svn: 95264
2010-02-03 22:29:02 +00:00
Dale Johannesen 0c426100d0 Debugging is now reenabled on PPC darwin, so reenable
these tests (they pass).

llvm-svn: 95263
2010-02-03 22:24:49 +00:00
Anders Carlsson b0695ef011 Don't try to fold DeclRefExprs that point to ParmVarDecls. This had the side-effect of always folding the expression to the default argument of the parameter. For example:
void f(int a = 10) {
  return a;
}

would always return 10, regardless of the passed in argument.

This fixes another 600 test failures. We're now down to only 137 failures!

llvm-svn: 95262
2010-02-03 21:58:41 +00:00
Chris Lattner 223084d3ac enhance new encoder to support prefixes + RawFrm
instructions with no operands.  It can now handle

define void @test2() nounwind { ret void }

llvm-svn: 95261
2010-02-03 21:57:59 +00:00
Chris Lattner 6794f9b9f6 set up some infrastructure, some minor cleanups.
llvm-svn: 95260
2010-02-03 21:43:43 +00:00
Evan Cheng f4139067ee Speculatively disable x86 automatic tail call optimization while we track down a self-hosting issue.
llvm-svn: 95259
2010-02-03 21:40:40 +00:00
Evan Cheng 112a871fe2 Make test less fragile
llvm-svn: 95258
2010-02-03 21:39:04 +00:00
Fariborz Jahanian 80c54b05a0 Fix more rewriting of protocol-quialified 'id' type.
(Fixes radar 7607413).

llvm-svn: 95257
2010-02-03 21:29:28 +00:00
Chris Lattner f914be06d2 stub out a new X86 encoder, which can be tried with
-enable-new-x86-encoder until its stable.

llvm-svn: 95256
2010-02-03 21:24:49 +00:00
Sebastian Redl 2b37272c11 In some contexts, type declarations cannot occur. Pass this information down to ParseClassSpecifier, to make its decision easier. Fixes PR6200.
llvm-svn: 95255
2010-02-03 21:21:43 +00:00
Chris Lattner 2f750f3b5a rename createX86MCCodeEmitter to more accurately reflect what it creates.
llvm-svn: 95254
2010-02-03 21:14:33 +00:00
Chris Lattner 93ddf80eb7 don't inform comment handlers about comments in #if 0 blocks,
doing so invalidates the file guard optimization and is not
in the spirit of "#if 0" because it is supposed to completely
skip everything, even if it isn't lexically valid. Patch by
Abramo Bagnara!

llvm-svn: 95253
2010-02-03 21:06:21 +00:00
Kevin Enderby 00f1e6c030 Added support for X86 instruction prefixes so llvm-mc can assemble them. The
Lock prefix, Repeat string operation prefixes and the Segment override prefixes.
Also added versions of the move string and store string instructions without the
repeat prefixes to X86InstrInfo.td. And finally marked the rep versions of
move/store string records in X86InstrInfo.td as isCodeGenOnly = 1 so tblgen is
happy building the disassembler files.

llvm-svn: 95252
2010-02-03 21:04:42 +00:00
Douglas Gregor 21e771e96e Define two types to be "compatible" in C++ if they are the same, and
remove some age-old FIXMEs and C++ workarounds within the
type-compatibility logic.

llvm-svn: 95249
2010-02-03 21:02:30 +00:00
Chris Lattner 5e854b95f3 Declarators can have grouping parens. This fixes rdar://7608537.
llvm-svn: 95246
2010-02-03 20:41:24 +00:00
Fariborz Jahanian 8c3f06d09c Patch to allow reinterpret_cast on objective-c pointers.
(partial fix for radar 7591784).

llvm-svn: 95245
2010-02-03 20:32:31 +00:00
Daniel Dunbar 45858d2d59 Revert "Numerous changes to selector handling:", this breaks a whole bunch of
working code, for no apparent reason.

llvm-svn: 95244
2010-02-03 20:11:42 +00:00
Devang Patel d231689adb Emit appropriate expression to find virtual base offset.
llvm-svn: 95242
2010-02-03 20:08:48 +00:00
Devang Patel 999b499024 Provide interface to identifiy artificial methods.
llvm-svn: 95240
2010-02-03 19:57:19 +00:00
Sebastian Redl cbdffb1585 Top-level const changes do not make a qualification conversion. Fixes PR6089.
llvm-svn: 95239
2010-02-03 19:36:07 +00:00
Douglas Gregor 2973d406ba When determining whether a function without a prototype is compatible
with a function with a prototype, treat parameters of enumeration type
based on the enumeration type's promotion type.

llvm-svn: 95238
2010-02-03 19:27:29 +00:00
Jeffrey Yasskin 099552a0ca r94686 changed all ModuleProvider parameters to Modules, which made the
1-argument ExecutionEngine::create(Module*) ambiguous with the signature that
used to be ExecutionEngine::create(ModuleProvider*, defaulted_params).  Fixed
by removing the 1-argument create().  Fixes PR6221.

llvm-svn: 95236
2010-02-03 19:18:04 +00:00
Anders Carlsson 66498388a7 Handle reference binding in aggregate initializers. Fixes another 47 tests.
llvm-svn: 95235
2010-02-03 19:13:55 +00:00