Commit Graph

49313 Commits

Author SHA1 Message Date
Evan Cheng 66cff408ff ARM JIT should observe -relocation-model command line option.
llvm-svn: 58433
2008-10-30 16:10:54 +00:00
Ted Kremenek d26da8cf82 Patch by Nikita Zhuk: test case for fix for false positive reported in PR2978.
llvm-svn: 58432
2008-10-30 15:19:43 +00:00
Ted Kremenek 689ec0eb32 Patch by Nikita Zhuk:
Fix PR 2978 false positive for missing release in -dealloc of an ivar retained via a property and then released by assigning nil to that property:

  http://llvm.org/bugs/show_bug.cgi?id=2978

llvm-svn: 58431
2008-10-30 15:13:43 +00:00
Steve Naroff 44df6a205b Make sure RewriteObjCMethodDecl() does a block pointer rewrite.
llvm-svn: 58430
2008-10-30 14:45:29 +00:00
Douglas Gregor ffe249f5e5 Fix arithmetic type check
llvm-svn: 58429
2008-10-30 13:47:07 +00:00
Steve Naroff 295570a126 Add a couple fixes for rewriting ivars/methods that use/contain blocks.
Now this:

@interface Test
{
  void (^ivar)(void);
}
- (void)name;
@end

@implementation Test
- (void)name {
  ivar = ^{ printf("hello\n"); }; // ((struct Test_IMPL *)self)->ivar = (void (*)(void))&__name_block_impl_0((void *)__name_block_func_0);
  ivar(); // ((void (*)(struct __block_impl *))((struct __block_impl *)((struct Test_IMPL *)self)->ivar)->FuncPtr)((struct __block_impl *)((struct Test_IMPL *)self)->ivar); 
}

llvm-svn: 58428
2008-10-30 12:09:33 +00:00
Steve Naroff 350b665610 Convert SynthesizeBlockCall() from test->AST based implementation.
llvm-svn: 58427
2008-10-30 10:07:53 +00:00
Mon P Wang 58c3794c27 Add initial support for vector widening. Logic is set to widen for X86.
One will only see an effect if legalizetype is not active.  Will move
support to LegalizeType soon.

llvm-svn: 58426
2008-10-30 08:01:45 +00:00
Zhongxing Xu 610634fe39 Merge the array and struct case. They are essentially the same.
llvm-svn: 58422
2008-10-30 05:35:59 +00:00
Zhongxing Xu a15cfd4db9 Rename:
- SetSVal(GRState*, Loc, SVal) => BindLoc
 - SetSVal(GRState*, Expr*, SVal) => BindExpr 

llvm-svn: 58421
2008-10-30 05:33:54 +00:00
Zhongxing Xu 9655394b6e Adjust code format.
llvm-svn: 58420
2008-10-30 05:03:28 +00:00
Zhongxing Xu b281cdda87 Implement VisitInitListExpr(). InitListExpr will have a nonloc::CompoundVal value.
llvm-svn: 58419
2008-10-30 05:02:23 +00:00
Zhongxing Xu ef5f25a05f Add CompoundVal and CompoundValData for representing the value of InitListExpr.
llvm-svn: 58418
2008-10-30 04:58:00 +00:00
Zhongxing Xu 51ac923ca3 Fix 80-col.
llvm-svn: 58417
2008-10-30 04:53:23 +00:00
Chris Lattner 7292fb191f mention fortran status.
llvm-svn: 58416
2008-10-30 03:58:13 +00:00
Scott Michel 487c43412d Resolve bug 2947: vararg-marked functions must spill registers R3-R79 to stack
so that va_start/va_arg/et.al. will walk arguments correctly for Cell SPU.

N.B.: Because neither clang nor llvm-gcc-4.2 can be built for CellSPU, this is
still unexorcised code.

llvm-svn: 58415
2008-10-30 01:51:48 +00:00
Bill Wendling af7059edbf Revert r58411. The user needs to #define this when using the JITMemoryManager.h header.
llvm-svn: 58414
2008-10-30 01:22:58 +00:00
Dan Gohman 97acad13de Spell DISABLE_ASSERTIONS correctly.
llvm-svn: 58413
2008-10-30 01:08:03 +00:00
Daniel Dunbar def9076430 Fix specification references link.
llvm-svn: 58412
2008-10-30 00:53:12 +00:00
Bill Wendling f11b321b28 Revert part of r58048. It was breaking on SnowLeopard claiming that
"__STDC_CONSTANT_MACROS" needs to be #defined first.

llvm-svn: 58411
2008-10-30 00:11:55 +00:00
Ted Kremenek 204ae1f0d9 Mark yy_fatal_error as a panic function.
llvm-svn: 58410
2008-10-30 00:00:57 +00:00
Evan Cheng 19d64ba8bf Correct way to handle CONSTPOOL_ENTRY instructions.
llvm-svn: 58409
2008-10-29 23:55:43 +00:00
Evan Cheng de9dbc5584 Add debugging support.
llvm-svn: 58408
2008-10-29 23:55:17 +00:00
Evan Cheng 4421a114bb Let target resolve some relocation results.
llvm-svn: 58407
2008-10-29 23:54:46 +00:00
Evan Cheng d520a5296a This is not needed anymore.
llvm-svn: 58406
2008-10-29 23:54:10 +00:00
Evan Cheng 34bd7fbb13 Add a bit to MachineRelocation that tells JIT that target is responsible for resolving the address. e.g. ARM constpool.
llvm-svn: 58405
2008-10-29 23:53:42 +00:00
Douglas Gregor 23a1f195bd Improve documentation for Sema::CheckReferenceInit
llvm-svn: 58404
2008-10-29 23:31:03 +00:00
Nate Begeman 534ac08ebd Fix PEXTRQ encoding
llvm-svn: 58403
2008-10-29 23:07:17 +00:00
Daniel Dunbar c475d4224b NeXT: Emit protocol objects lazily.
- That is, the metadata for a protocol is only emitted if that
   protocol is actually used in the translation unit. This is
   important because Objective-C headers frequently contain a large
   number of protocol definitions, only a few of which will be used in
   any given file.

llvm-svn: 58400
2008-10-29 22:36:39 +00:00
Steve Naroff e25142302e Convert SynthBlockInitExpr() from text->AST based implementation.
llvm-svn: 58396
2008-10-29 21:23:59 +00:00
Sebastian Redl 5c0098271b Remove workaround for reference. No longer necessary.
llvm-svn: 58395
2008-10-29 19:45:21 +00:00
Sebastian Redl 5f74e09f47 Fix missing %s in run string causing hang during tests.
llvm-svn: 58394
2008-10-29 19:29:09 +00:00
Chris Lattner 7ee0012707 add testcase for PR2964
llvm-svn: 58393
2008-10-29 18:42:22 +00:00
Ted Kremenek 82c1cc3d52 Fix crash reported in PR2923 where a function declared using typeof(another_function) would have FunctionDecl::getNumParams() return the number of parameters in the original function type and not the number of parameters in the actual FunctionDecl.
llvm-svn: 58392
2008-10-29 18:41:34 +00:00
Dale Johannesen 98aa9d3e49 Add a RM pseudoreg for the rounding mode, which
allows ppcf128->int conversion to work with
DeadInstructionElimination.  This is now turned
off but RM is harmless.  It does not do a complete
job of modeling the rounding mode.

Revert marking MFCR as using all 7 CR subregisters;
while correct, this caused the problem in PR 2964,
plus the local RA crash noted in the comments.
This was needed to make DeadInstructionElimination,
but as we are not running that, it is backed out
for now.  Eventually it should go back in and the
other problems fixed where they're broken.

llvm-svn: 58391
2008-10-29 18:26:45 +00:00
Steve Naroff d8907b7bea Handle block literals at file scope, remove some dead code, etc.
llvm-svn: 58390
2008-10-29 18:15:37 +00:00
Duncan Sands 57b754612c Testcase for PR2917.
llvm-svn: 58389
2008-10-29 18:06:20 +00:00
Douglas Gregor 2f339f0612 Make the non-reference check in Expr work always
llvm-svn: 58388
2008-10-29 18:00:54 +00:00
Duncan Sands ee273419f9 Uniformize capitalization of NodeId.
llvm-svn: 58386
2008-10-29 17:52:12 +00:00
Chris Lattner 0934c0f35b Fix PR2967 by not deleting volatile load/stores that occur before unreachable.
I don't really see this as being needed, but there is little harm from doing
it.

llvm-svn: 58385
2008-10-29 17:46:26 +00:00
Torok Edwin 49c28e4599 fix typo
llvm-svn: 58384
2008-10-29 16:32:06 +00:00
Duncan Sands f33c3bc51f Make the declaration of bzero match size_t on
x86-64-linux.

llvm-svn: 58383
2008-10-29 15:57:37 +00:00
Douglas Gregor cad304ba37 Simplify and correct the check for function redefinitions. This does two things:
- Allows definitions of overloaded functions :)
  - Eliminates extraneous error messages when we have a definition of a 
    function that isn't an overload but doesn't have exactly the same type
    as the original.
  

llvm-svn: 58382
2008-10-29 15:10:40 +00:00
Douglas Gregor ef30a5ff98 Implement overloading rules for reference binding
llvm-svn: 58381
2008-10-29 14:50:44 +00:00
Steve Naroff 52c65fa169 Make sure internally synthesized block pointer types are converted before pretty printing.
llvm-svn: 58380
2008-10-29 14:49:46 +00:00
Duncan Sands fbb10bbec4 Fix PR2977: LegalizeTypes support for expanding
VAARG.

llvm-svn: 58379
2008-10-29 14:25:28 +00:00
Duncan Sands 17e678be87 Add sanity checking for BUILD_PAIR (I noticed the
other day that PPC custom lowering could create
a BUILD_PAIR of two f64 with a result type of...
f64! - already fixed).  Fix a place that triggers
the sanity check.

llvm-svn: 58378
2008-10-29 14:22:20 +00:00
Douglas Gregor 9774aa13c7 Temporary disable the const-object-declaration-without-initializer check, because it depends on linkage-specifier semantics we don't yet have
llvm-svn: 58377
2008-10-29 13:50:18 +00:00
Daniel Dunbar b3a36cf86a Workaround an LLVM bug where inlining functions with debug info breaks
code generation.
 - For now, disable running the always inliner pass (at -O0) if we are
   also generating debug information.

llvm-svn: 58376
2008-10-29 08:50:02 +00:00
Evan Cheng ce3ccc1ea0 - More pre-split fixes: spill slot live interval computation bug; restore point bug.
- If a def is spilt, remember its spill index to allow its reuse.

llvm-svn: 58375
2008-10-29 08:39:34 +00:00