Commit Graph

78852 Commits

Author SHA1 Message Date
Bill Wendling 88fdcd323d LLVM puts padding bytes in the __gcc_except_tab section after the
GCC_except_table label but before the Lexception, which the FDE references.
This causes problems as the FDE does not point to the start of an LSDA chunk.

Use an unnormalized uleb128 for the call-site table length that includes the
padding.

llvm-svn: 97078
2010-02-24 23:34:35 +00:00
Douglas Gregor 40d732fee7 Make sure that we finish the DeclSpec when parsing a C++
type-specifier-seq. Fixes some conditional-jump-on-unitialized-value
errors in valgrind. Also counts as attempt #2 at making the MSVC
buildbot happy.

llvm-svn: 97077
2010-02-24 23:13:13 +00:00
Douglas Gregor 90ad922a73 Make sure that we have type source information for the scope type of a
pseudo-destructor expression. Attempt #1 at fixing the MSVC buildbot.

llvm-svn: 97076
2010-02-24 23:02:30 +00:00
Fariborz Jahanian 1f7fe2c7f7 Added test case for non-objective-c situation in
my last patch.

llvm-svn: 97075
2010-02-24 22:53:58 +00:00
Chris Lattner 005bb14825 fix a bug I introduced by checking the wrong node's VT in OPC_CheckChildXType
llvm-svn: 97074
2010-02-24 22:52:52 +00:00
Fariborz Jahanian 8652be05b7 Implement nasty rewriting of nested blocks when inner
blocks use variables not used in any of the outer blocks.
(Fixes radar 7682149).

llvm-svn: 97073
2010-02-24 22:48:18 +00:00
Chris Lattner d3aa3aa0ec clean up various VT manipulations, patch by Micah Villmow! PR6337
llvm-svn: 97072
2010-02-24 22:44:06 +00:00
Jakob Stoklund Olesen 63af51c1c8 Create a stack frame on ARM when
- Function uses all scratch registers AND
- Function does not use any callee saved registers AND
- Stack size is too big to address with immediate offsets.

In this case a register must be scavenged to calculate the address of a stack
object, and the scavenger needs a spare register or emergency spill slot.

llvm-svn: 97071
2010-02-24 22:43:17 +00:00
Douglas Gregor b1dd23fbc4 Split ActOnPseudoDestructorExpr into the part that interprets the
parser's data structures and the part that performs semantic analysis
and AST building, in preparation for improved template instantiation
of pseudo-destructor expressions.

llvm-svn: 97070
2010-02-24 22:38:50 +00:00
Chris Lattner 8423d0241f fix PR5954, patch by Roman Divacky.
I don't have a great way to test this myself (it's linux/bsd only), 
but Roman says it works. :)

llvm-svn: 97069
2010-02-24 22:33:41 +00:00
Anders Carlsson 3c1ec97a28 Get rid of 'this' adjustments from the FinalOverriders class since they can be different for the same overrider in different parts of the vtable.
llvm-svn: 97068
2010-02-24 22:32:18 +00:00
Anders Carlsson d8d698da60 Improve this adjustment pointer calculation.
llvm-svn: 97067
2010-02-24 22:27:12 +00:00
Anders Carlsson 8025e7b1b9 Make ComputeThisAdjustmentBaseOffset public for now.
llvm-svn: 97066
2010-02-24 22:18:01 +00:00
Bob Wilson ba8ac74fd9 Check for comparisons of +/- zero when optimizing less-than-or-equal and
greater-than-or-equal SELECT_CCs to NEON vmin/vmax instructions.  This is
only allowed when UnsafeFPMath is set or when at least one of the operands
is known to be nonzero.

llvm-svn: 97065
2010-02-24 22:15:53 +00:00
Dan Gohman 4b2b48daba Make getTypeSizeInBits work correctly for array types; it should return
the number of value bits, not the number of bits of allocation for in-memory
storage.

Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and
vectors.

Fix several places in CodeGen which compute offsets into in-memory vectors
to use TargetData information.

This fixes PR1784.

llvm-svn: 97064
2010-02-24 22:05:23 +00:00
Douglas Gregor 26623cb13e Add test case for PR6141, which was fixed a few days ago
llvm-svn: 97063
2010-02-24 21:54:27 +00:00
Douglas Gregor f06027db65 Add test for AST importing of C++ namespaces, missing from a prior commit
llvm-svn: 97062
2010-02-24 21:53:36 +00:00
Douglas Gregor 8b1d732f85 Add PCH test for C++ namespaces, missing from a previous commit
llvm-svn: 97061
2010-02-24 21:52:55 +00:00
Douglas Gregor 75d8ec1fbe Retain source information for the "type-name ::" in a
pseudo-destructor expression such as

  p->T::~T()

llvm-svn: 97060
2010-02-24 21:52:20 +00:00
Chris Lattner 9b7cfd39b2 convert cycle checker to smallptrset, add comments and make it
more elegant.

llvm-svn: 97059
2010-02-24 21:34:04 +00:00
Douglas Gregor 0d5b0a1e5e ActOnPseudoDestructorExpr now performs all semantic analysis for
pseudo-destructor expressions, and builds the CXXPseudoDestructorExpr
node directly. Currently, this only affects pseudo-destructor
expressions when they are parsed, but not after template
instantiation. That's coming next...

Improve parsing of pseudo-destructor-names. When parsing the
nested-name-specifier and we hit the sequence of tokens X :: ~, query
the actual module to determine whether X is a type-name (in which case
the X :: is part of the pseudo-destructor-name but not the
nested-name-specifier) or not (in which case the X :: is part of the
nested-name-specifier). 

llvm-svn: 97058
2010-02-24 21:29:12 +00:00
Chris Lattner 02ec121de8 revert david's patch which does not even build.
llvm-svn: 97057
2010-02-24 21:25:08 +00:00
David Greene 8328341d9c Use a SmallPtrSet as suggested by Chris.
llvm-svn: 97056
2010-02-24 20:59:49 +00:00
John McCall aea181de04 Fix an iterator-invalidation bug that was causing selfhost errors
on non-darwin platforms.  Fixes PR6411. Test case doesn't reduce,
unfortunately.

llvm-svn: 97055
2010-02-24 20:32:01 +00:00
Wesley Peck 05d9124625 Adding function "lookupGCCName" to MBlazeIntrinsicInfo
Adding the function "lookupGCCName" to the MBlazeIntrinsicInfo
class to support the Clang MicroBlaze target.

Additionally, minor fixes which remove some unused PIC code 
(PIC is not supported yet in the MicroBlaze backend) and
removed some unused variables.

llvm-svn: 97054
2010-02-24 20:16:27 +00:00
Chris Lattner 0c95baa848 contract movechild+checktype into a new checkchild node, shrinking the
x86 table by 1200 bytes.

llvm-svn: 97053
2010-02-24 20:15:25 +00:00
Johnny Chen 86ba44a4c7 Added Vector Swap (VSWPd and VSWPq) instructions for disassembly only.
A8.6.405

llvm-svn: 97052
2010-02-24 20:06:07 +00:00
Chris Lattner 6b79232138 split the movechild/record/moveparent -> recordchild optzn into a
movechild/record -> recordchild/movechild and 
movechild/moveparent -> noop xforms.  This slightly shrinks the tables
(x86 to 117454) and enables adding future improvements.

llvm-svn: 97051
2010-02-24 19:52:48 +00:00
Dan Gohman 4aad750333 ConstantFoldInstOperands can theoretically return null if it
didn't fold anything.

llvm-svn: 97049
2010-02-24 19:31:47 +00:00
Dan Gohman 007f5041a2 Simplify this code; these casts aren't necessary.
llvm-svn: 97048
2010-02-24 19:31:06 +00:00
Chris Lattner 9203ca8995 emit a histogram of the opcodes in comments.
llvm-svn: 97047
2010-02-24 19:17:12 +00:00
Jakob Stoklund Olesen 0b94eb19e4 Stay away from str <undef> in ARMLoadStoreOpt. This pass does not understand
<undef> operands, and can cause scavenger failures when it translates
<kill,undef> to <kill>.

llvm-svn: 97046
2010-02-24 18:57:08 +00:00
Douglas Gregor e610adae17 Rework parsing of pseudo-destructor expressions and explicit
destructor calls, e.g., 

  p->T::~T

We now detect when the member access that we've parsed, e.g.,

  p-> or x.

may be a pseudo-destructor expression, either because the type of p or
x is a scalar or because it is dependent (and, therefore, may become a
scalar at template instantiation time). 

We then parse the pseudo-destructor grammar specifically:

  ::[opt] nested-name-specifier[opt] type-name :: ∼ type-name

and hand those results to a new action, ActOnPseudoDestructorExpr,
which will cope with both dependent member accesses of destructors and
with pseudo-destructor expressions.

This commit affects the parsing of pseudo-destructors, only; the
semantic actions still go through the semantic actions for member
access expressions. That will change soon.

llvm-svn: 97045
2010-02-24 18:44:31 +00:00
Johnny Chen 03ac201ad9 Fixed typo of opcodestr, should be "vst1", not "vld1".
llvm-svn: 97044
2010-02-24 18:00:40 +00:00
Dan Gohman ba820344e3 Convert a few more backedge-taken count functions to use BackedgeTakenInfo.
llvm-svn: 97042
2010-02-24 17:31:30 +00:00
Daniel Dunbar 4811d004be Speculatively revert r97011, "Re-apply 96540 and 96556 with fixes.", again in
the hopes of fixing PPC bootstrap.

llvm-svn: 97040
2010-02-24 17:05:47 +00:00
Anders Carlsson a9f633b060 Generate correct vcall offsets when we have a primary virtual base that is not a primary base in the complete class hierarchy.
llvm-svn: 97039
2010-02-24 16:43:12 +00:00
John McCall 6dee473780 References to const int parameters with ICE default arguments are not ICEs.
Fixes PR6373.

llvm-svn: 97037
2010-02-24 09:03:18 +00:00
Daniel Dunbar 693ea89214 Reapply r97010, the speculative revert failed.
llvm-svn: 97036
2010-02-24 08:48:04 +00:00
John McCall 8bf8ac0775 Make this test portable to ABIs that use sret.
llvm-svn: 97035
2010-02-24 08:14:27 +00:00
Chris Lattner 739517da07 lets not break the old isel.
llvm-svn: 97034
2010-02-24 07:41:11 +00:00
Chris Lattner 9812470bc4 Since the new instruction selector now works, I don't need to keep
the old one around for comparative purposes: have the
ENABLE_NEW_ISEL #define (which is not enabled on mainline) stop
emitting the old isel at all, yay for build time win.

llvm-svn: 97033
2010-02-24 07:35:09 +00:00
John McCall 1826980fc8 Fix test case and convert fully to FileCheck.
llvm-svn: 97032
2010-02-24 07:33:39 +00:00
Chris Lattner ab41756c2e implement a simple proof-of-concept optimization for
the new isel: fold movechild+record+moveparent into a
single recordchild N node.  This shrinks the X86 table
from 125443 to 117502 bytes.

llvm-svn: 97031
2010-02-24 07:31:45 +00:00
John McCall 8ee376f08a Canonicalize parameter and return types before computing ABI info. Eliminates
a common source of oddities and, in theory, removes some redundant ABI
computations.  Also fixes a miscompile I introduced yesterday by refactoring
some code and causing a slightly different code path to be taken that
didn't perform *parameter* type canonicalization, just normal type
canonicalization;  this in turn caused a bit of ABI code to misfire because
it was looking for 'double' or 'float' but received 'const float'.

llvm-svn: 97030
2010-02-24 07:14:12 +00:00
Chris Lattner e7327435a7 The new isel passes all tests, time to start making it go fast.
Also add an easy macro at the top of DAGISelEmitter.cpp to enable
it.  Lets see if I can avoid accidentally turning it on :)

llvm-svn: 97029
2010-02-24 07:06:50 +00:00
Dan Gohman f10503760f Add svn:ignore properties.
llvm-svn: 97028
2010-02-24 07:06:20 +00:00
Daniel Dunbar 0a2031e5b6 Speculatively revert r97010, "Add an argument to PHITranslateValue to specify
the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap.

llvm-svn: 97027
2010-02-24 06:55:22 +00:00
Dan Gohman 3860521406 When forming SSE min and max nodes for UGE and ULE comparisons, it's
necessary to swap the operands to handle NaN and negative zero properly.

Also, reintroduce logic for checking for NaN conditions when forming
SSE min and max instructions, fixed to take into consideration NaNs and
negative zeros. This allows forming min and max instructions in more
cases.

llvm-svn: 97025
2010-02-24 06:52:40 +00:00
Dan Gohman 94732024eb Fix indentation.
llvm-svn: 97024
2010-02-24 06:46:09 +00:00