Commit Graph

84121 Commits

Author SHA1 Message Date
Chris Lattner 37c529ae68 expand on the llvm ir bitcode dox. Patch by Peter Housel!
llvm-svn: 104391
2010-05-21 22:20:54 +00:00
Anders Carlsson c866eb5ba9 Unbreak self-host.
llvm-svn: 104390
2010-05-21 22:17:48 +00:00
Ted Kremenek a2448b85be Update retain-release checker to understand changes to how 'super' is represented
in the ASTs.  Fixes <rdar://problem/8015556>.

llvm-svn: 104389
2010-05-21 21:57:00 +00:00
Ted Kremenek 5f03be9704 Pass around an error SourceRange instead of an Expr* when reporting errors
in the Objective-C memory checker.

llvm-svn: 104388
2010-05-21 21:56:53 +00:00
Anders Carlsson da1641cd12 Rename CodeGenFunction::EmitMemSetToZero to EmitNullInitialization. Handle setting null data member pointers correctly. Fixes PR7139.
llvm-svn: 104387
2010-05-21 21:45:41 +00:00
Douglas Gregor 9f44d1453b When instantiating a function declaration within a function template,
be sure to merge its parameter scope with its parent's scope. Fixes
PR7184.

llvm-svn: 104386
2010-05-21 21:25:08 +00:00
Evan Cheng 2c8bdead9e Allow machine cse to cse instructions which define physical registers. Controlled by option -machine-cse-phys-defs.
llvm-svn: 104385
2010-05-21 21:22:19 +00:00
Chris Lattner b9ea2c29a1 down with export.
llvm-svn: 104383
2010-05-21 21:16:21 +00:00
Abramo Bagnara f7eba5091c Improved TypeLoc::getSourceRange().
llvm-svn: 104382
2010-05-21 21:12:12 +00:00
Eric Christopher 3dca28d0e2 Fix section attribute name.
llvm-svn: 104381
2010-05-21 21:08:52 +00:00
Bob Wilson 51d9ee3ff6 Change CodeGen/ARM/2009-11-02-NegativeLane.ll to use 16-bit vector elements
so that it will continue to test what it was meant to test when I commit a
separate change for better support of BUILD_VECTOR and VECTOR_SHUFFLE for Neon.
Fix a DAG combiner crash exposed by this test change.

llvm-svn: 104380
2010-05-21 21:05:32 +00:00
Chris Lattner da9e3287f9 another unneeded line.
llvm-svn: 104379
2010-05-21 21:02:17 +00:00
Chris Lattner 6fe3748de4 major update to the C++ status page. C++ support is
now done and no more patches to it will be accepted.

llvm-svn: 104378
2010-05-21 20:59:40 +00:00
Evan Cheng 3858451e09 - Change MachineInstr::findRegisterDefOperandIdx so it can also look for defs
that are aliases of the specified register.
- Rename modifiesRegister to definesRegister since it's looking a def of the
specific register or one of its super-registers. It's not looking for def of a
sub-register or alias that could change the specified register.
- Added modifiesRegister to look for defs of aliases.

llvm-svn: 104377
2010-05-21 20:53:24 +00:00
John McCall b54367d2f8 Propagate access specifiers to anonymous union members nested within classes.
Fixes <rdar://problem/7987650>.

llvm-svn: 104376
2010-05-21 20:45:30 +00:00
Ted Kremenek 304a9537e1 Fix crash in CFG construction for 'break' statements appearing in statement expressions
within the increment code of a for loop.

llvm-svn: 104375
2010-05-21 20:30:15 +00:00
Douglas Gregor 27ac429624 Use CanQualType to enforce the use of a canonical type argument to
CXXBasePaths::isAmbiguous(), rather than just asserting that we have a
canonical type. Fixes PR7176.

llvm-svn: 104374
2010-05-21 20:29:55 +00:00
Chris Lattner c425fe4c80 don't make _Bool be a keyword in -fms-extensions mode, patch by
Steven Watanabe!

llvm-svn: 104373
2010-05-21 20:22:37 +00:00
Jakob Stoklund Olesen 7d7f604321 Add MachineInstr::readsWritesVirtualRegister() to determine if an instruction
reads or writes a register.

This takes partial redefines and undef uses into account.

Don't actually use it yet. That caused miscompiles.

llvm-svn: 104372
2010-05-21 20:02:01 +00:00
Benjamin Kramer 71b0bb9922 Try to fix MSVC build.
llvm-svn: 104371
2010-05-21 19:58:44 +00:00
Devang Patel 1782aae355 Simplify
llvm-svn: 104338
2010-05-21 18:49:09 +00:00
Dale Johannesen 2b78565842 Previous commit message should refer to 104308.
llvm-svn: 104337
2010-05-21 18:44:47 +00:00
Dale Johannesen 6361e3e8a2 Fix two bugs in 104348:
Case where MMX is disabled wasn't handled right.
MMX->MMX bitconverts are Legal.

llvm-svn: 104336
2010-05-21 18:40:15 +00:00
Douglas Gregor 3fe900e410 Don't remove the break/continue scope of a for loop until after we've
emitted the increment expression. Fixes PR7189.

If someone knows how to write a useful test for this, I'd be grateful. 

llvm-svn: 104335
2010-05-21 18:36:48 +00:00
Nathan Jeffords ea91abddfe added an assertion to MCObjectWriter::WriteBytes to catch misuse of the ZeroFillSize parameter
If the size of the string is greater than the zero fill size, the function will attempt to write a very large string of zeros to the object file (~4GB on 32 bit platforms). This assertion will catch the scenario and crash the program before the write occurs.

llvm-svn: 104334
2010-05-21 18:23:56 +00:00
Chris Lattner 0735ecfe17 now that fp reg kill insertion stuff happens as a separate
pass after isel instead of being interlaced with it, we can
trust that all the code for a function has been isel'd before
it is run.

The practical impact of this is that we can scan for machine
instr phis instead of doing a fuzzy match on the LLVM BB for
phi nodes.  Doing the fuzzy match required knowing when isel
would produce an fp reg stack phi which was gross.  It was
also wrong in cases where select got lowered to a branch
tree because cmovs aren't available (PR6828).

Just do the scan on machine phis which is simpler, faster
and more correct.  This fixes PR6828.

llvm-svn: 104333
2010-05-21 18:17:54 +00:00
Nick Lewycky 1a23f26832 TypeVisitor doesn't visit Stmts.
llvm-svn: 104332
2010-05-21 18:04:30 +00:00
Chris Lattner 058a207436 Use less evil form of switch stmt.
llvm-svn: 104331
2010-05-21 18:02:42 +00:00
Chris Lattner 39a8a43bd8 use continue to reduce nesting.
llvm-svn: 104330
2010-05-21 18:01:24 +00:00
Chris Lattner b7d68a2256 pull a nested loop of this pass out to its own function,
eliminating the gymnastics around the ContainsFPCode var.

llvm-svn: 104328
2010-05-21 17:57:03 +00:00
Douglas Gregor c5871f07f0 When generating the call arguments in a thunk to call the thunkee, do
not make copies non-POD arguments or arguments passed by reference:
just copy the pointers directly. This eliminates another source of the
dreaded memcpy-of-non-PODs. Fixes PR7188.

llvm-svn: 104327
2010-05-21 17:55:12 +00:00
Chris Lattner fb41aaefeb modernize this pass a bit, fit in 80 columns.
llvm-svn: 104326
2010-05-21 17:49:07 +00:00
Chris Lattner a81e1cab04 constify accessor.
llvm-svn: 104325
2010-05-21 17:47:50 +00:00
Jakob Stoklund Olesen b4e1687270 Revert "Use MachineInstr::readsWritesVirtualRegister to determine if a register is read."
This reverts r104322. I think it was causing miscompilations.

llvm-svn: 104323
2010-05-21 17:36:32 +00:00
Jakob Stoklund Olesen 8e8e090301 Use MachineInstr::readsWritesVirtualRegister to determine if a register is read.
This correctly handles partial redefines and undef uses.

llvm-svn: 104322
2010-05-21 16:42:30 +00:00
Jakob Stoklund Olesen a648c6a757 Teach VirtRegRewriter to handle spilling in instructions that have multiple
definitions of the virtual register.

This happens when spilling the registers produced by REG_SEQUENCE:

%reg1047:5<def>, %reg1047:6<def>, %reg1047:7<def> = VLD3d8 %reg1033, 0, pred:14, pred:%reg0

The rewriter would spill the register multiple times, dead store elimination
tried to keep up, but ended up cutting the branch it was sitting on.

llvm-svn: 104321
2010-05-21 16:36:13 +00:00
Jakob Stoklund Olesen 1f3801062d If the first definition of a virtual register is a partial redef, add an
<imp-def> operand for the full register. This ensures that the full physical
register is marked live after register allocation.

llvm-svn: 104320
2010-05-21 16:32:16 +00:00
Fariborz Jahanian 6dc47ed396 Changed test to use FileCheck.
llvm-svn: 104319
2010-05-21 16:13:37 +00:00
Matt Fleming 638cdb2db1 Currently, createMachOStreamer() is invoked directly in llvm-mc which
isn't ideal if we want to be able to use another object file format.

Add a createObjectStreamer() factory method so that the correct object
file streamer can be instantiated for a given target triple.

llvm-svn: 104318
2010-05-21 12:54:43 +00:00
Matt Fleming 5abb6dd61e Split out the x86_32 an x86_64 ELF backends as they handle ELF
differently. This will make adding ELF support easier in the long run.

llvm-svn: 104317
2010-05-21 11:39:07 +00:00
Matt Fleming ec9d6faef0 Add support for parsing the ELF .type assembler directive.
llvm-svn: 104316
2010-05-21 11:36:59 +00:00
Chandler Carruth 6bd3682f84 Teach the RecursiveASTVisitor to enter parts of the AST previously missed.
Factor its implementation to ease the addition of these custom edges to
traverse. With this patch we get initializer expressions, block bodies, type
source info, and function argument, result, and exception types. There are
probably still some more missed edges.

While we're here, clean up and flesh out a bunch of comments.

Patch by Zhanyong Wan; I've done a cursory review, but further review
appreciated. This is fast becoming one of the most important public APIs to the
AST.

llvm-svn: 104315
2010-05-21 10:29:57 +00:00
Chandler Carruth 7ea01c3f8a Add braces to avoid an ambiguous else, fixing a GCC warning.
llvm-svn: 104314
2010-05-21 10:29:28 +00:00
John McCall 9d42f0f174 Allocate space in a block record for implicit references to the Objective C
'self' variable arising from uses of the 'super' keyword.  Also reorganize
some code so that BlockInfo (now CGBlockInfo) can be opaque outside of
CGBlocks.cpp.

Fixes rdar://problem/8010633.

llvm-svn: 104312
2010-05-21 04:11:14 +00:00
Lang Hames d5f0998c6e Removed scaleNumbering method declaration from LiveInterval (not defined, not used).
llvm-svn: 104311
2010-05-21 03:04:04 +00:00
John McCall c4094935c0 When emitting an lvalue for an anonymous struct or union member during
class initialization, drill down through an arbitrary number of anonymous
records.

llvm-svn: 104310
2010-05-21 01:18:57 +00:00
John McCall 61925b03cc Introduce a method to get from an anonymous struct or union record declaration
to the associated object declaration.

llvm-svn: 104309
2010-05-21 01:17:40 +00:00
Dale Johannesen b3b9c8ac48 Fix i64->f64 conversion, x86-64, -no-sse. A bit
tricky since there's a 3rd 64-bit type, MMX vectors.
PR 7135.

llvm-svn: 104308
2010-05-21 00:52:33 +00:00
Evan Cheng 34c260458a Change ARM scheduling default to list-hybrid if the target supports floating point instructions (and is not using soft float).
llvm-svn: 104307
2010-05-21 00:43:17 +00:00
Evan Cheng 725211e948 Rename -pre-RA-sched=hybrid to -pre-RA-sched=list-hybrid.
llvm-svn: 104306
2010-05-21 00:42:32 +00:00