Commit Graph

49265 Commits

Author SHA1 Message Date
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
Daniel Dunbar e74f2c2633 Improve llvm-gcc compatibility, -Os implies -O2 (sortof).
llvm-svn: 58374
2008-10-29 07:56:11 +00:00
Zhongxing Xu 9c15820ea6 Add notes for SCA.
llvm-svn: 58373
2008-10-29 07:05:10 +00:00
Duncan Sands b964813b1f Fix a FIXME: in ReplaceNodeWith, if the new node
is morphed by AnalyzeNewNode into a previously
processed node, and different result values of
that node are remapped to values with different
nodes, then we could end up using wrong values
here [we were assuming that all results remap
to values with the same underlying node].  This
seems theoretically possible, but I don't have
a testcase.  The meat of the patch is in the
changes to AnalyzeNewNode/AnalyzeNewValue and
ReplaceNodeWith.  While there, I changed names
like RemapNode to RemapValue, since it really
remaps values.  To tell the truth, I would be
much happier if we were only remapping nodes
(it would simplify a bunch of logic, and allow
for some cute speedups) but I haven't yet worked
out how to do that.

llvm-svn: 58372
2008-10-29 06:42:19 +00:00
Duncan Sands 914745768e Fix 80 column violations.
llvm-svn: 58371
2008-10-29 06:33:00 +00:00
Duncan Sands d4ec020734 Fix 80 column violations.
llvm-svn: 58370
2008-10-29 06:31:03 +00:00
Ted Kremenek f521e4a90b Update checker build.
llvm-svn: 58369
2008-10-29 06:19:03 +00:00
Daniel Dunbar 719781633a Update FindSpecRefs to recognize named section references.
- Unfortunately, I don't have an easy way to map from named sections
   to numbers nicely so they don't get page numbers or integrate in
   the list well.

llvm-svn: 58368
2008-10-29 05:58:09 +00:00
Evan Cheng 938e201528 - Rewrite code that update register live interval that's split.
- Create and update spill slot live intervals.
- Lots of bug fixes.

llvm-svn: 58367
2008-10-29 05:06:14 +00:00
Eli Friedman 5adca5f02c Fix for PR2966: va_start/va_end use the *address* of the
va_list, not the value.  Patch fixes an assert on 
x86-64 and a wrong-code bug on x86.  I'm not completely sure, 
but I think it's a regression from r58306.

Does anyone run regression tests regularly on x86-64? The crash should 
have been picked up there.

llvm-svn: 58366
2008-10-29 04:39:20 +00:00
Ted Kremenek 3f04949b2a Patch by Nikita Zhuk:
The attached patch adds additional checks to -warn-objc-missing-dealloc. It checks that all ivars which are used in implementation of synthesized properties are either

a) released in dealloc if the property has retain" or "copy" attribute OR
b) not released in dealloc if the property has "assign" attribute

llvm-svn: 58363
2008-10-29 04:30:28 +00:00
Ted Kremenek 3700b762ff IOServiceGetMatchingServices is a release function.
llvm-svn: 58362
2008-10-29 04:07:07 +00:00
Daniel Dunbar a3730a23a2 Choose CompileOptions (optimization passes) to match llvm-gcc more
closely.

llvm-svn: 58361
2008-10-29 03:42:18 +00:00
Daniel Dunbar dc4030454d Fix mmintrin.h to use proper definition of functions taking no
arguments.
 - More important than it looks, this inhibits trivial inlining
   otherwise.

llvm-svn: 58360
2008-10-29 03:37:55 +00:00
Zhongxing Xu 628ae879ea Rename: AddDecl => BindDecl
BindDecl better describes what the function does:
  - Bind the VarDecl to its memory region
  - Bind the memory region to some initial value.

llvm-svn: 58359
2008-10-29 02:34:02 +00:00
Oscar Fuentes 2500aaebdd CMake: Removed some cruft.
llvm-svn: 58358
2008-10-29 02:33:15 +00:00
Douglas Gregor 786ab2119f Tweak Sema::CheckReferenceInit so that it (optionally) computes an
ImplicitConversionSequence and, when doing so, following the specific
rules of [over.best.ics]. 

The computation of the implicit conversion sequences implements C++
[over.ics.ref], but we do not (yet) have ranking for implicit
conversion sequences that use reference binding.

llvm-svn: 58357
2008-10-29 02:00:59 +00:00
Zhongxing Xu cfa9d8e9a0 MemSpaceRegions could be uninitialized. We only require R is a real region.
llvm-svn: 58356
2008-10-29 01:13:28 +00:00
Daniel Dunbar e7fbf9f425 Factor shouldInline method out of Inliner.
- No functionality change.

llvm-svn: 58355
2008-10-29 01:02:02 +00:00
David Greene 125f96d369 Don't force things to be Value * when they're not.
llvm-svn: 58354
2008-10-29 00:30:54 +00:00
Douglas Gregor 8e1cf608dc Implement initialization of a reference (C++ [dcl.init.ref]) as part
of copy initialization. Other pieces of the puzzle:

  - Try/Perform-ImplicitConversion now handles implicit conversions
    that don't involve references.
  - Try/Perform-CopyInitialization uses
    CheckSingleAssignmentConstraints for C. PerformCopyInitialization
    is now used for all argument passing and returning values from a
    function.
  - Diagnose errors with declaring references and const values without
    an initializer. (Uses a new Action callback, ActOnUninitializedDecl).
  
We do not yet have implicit conversion sequences for reference
binding, which means that we don't have any overloading support for
reference parameters yet.

llvm-svn: 58353
2008-10-29 00:13:59 +00:00
Daniel Dunbar cc20455346 Assorted comment/naming fixes, 80-col violations, and reindentation.
- No functionality change.

llvm-svn: 58352
2008-10-28 23:24:26 +00:00
Dan Gohman 2c34c130bf (A & sext(C)) | (B & ~sext(C) -> C ? A : B
llvm-svn: 58351
2008-10-28 22:38:57 +00:00
Dan Gohman 1e3c25ac2d Take Chris' suggestion and define EnableFastISelVerbose and
EnableFastISelAbort variables for Release mode instead of
using ifdefs in the code.

llvm-svn: 58350
2008-10-28 20:35:31 +00:00
Chris Lattner 1500970962 .s files don't require the preprocessor, patch by Roman Divacky!
llvm-svn: 58349
2008-10-28 20:33:42 +00:00
Steve Naroff f4b992a8ec More changes necessary to integrate the objc and blocks rewriters.
With this commit, stuff like this is very close to working...

    [foo barf:^(int){ printf("whatever\n"); }];

Here is what is currently translates to...

    ((id (*)(id, SEL, void (^)(int)))(void *)objc_msgSend)((id)foo, sel_registerName("barf:"), (void (*)(int))__main_block_func_0);

I just need make sure the funky cast on objc_msgSend() is converted from "void (^)(int)" to "void (*)(int)". Since the cast doesn't appear in the source code, it needs to be converted in RewriteObjC::SynthMessageExpr().

llvm-svn: 58348
2008-10-28 20:29:00 +00:00
Ted Kremenek 2800afa640 Minor UI enhancement:
(1) when all of the bug category boxes are checked, automatically check "All Bugs"

(2) when any of the bug category boxes are unchecked, automatically uncheck "All Bugs"

llvm-svn: 58346
2008-10-28 20:09:57 +00:00
Chris Lattner 8f243a5dde llvm-ld doesn't have a -march option. This fixes PR2961
llvm-svn: 58345
2008-10-28 20:05:06 +00:00
Ted Kremenek 99205241f4 Patch by Nikita Zhuk:
The attached patch adds a checkbox to the scan-build summary report, which toggles all other checkboxes' states.

llvm-svn: 58344
2008-10-28 19:56:52 +00:00
Daniel Dunbar db0b70a937 Reuse PrintEscapedString for printing names in .ll
- One functionality change, '\\' in a name is now printed as a hex
   escape instead of "\\\\". This is consistent with other users of
   PrintEscapedString.

llvm-svn: 58343
2008-10-28 19:33:02 +00:00
Daniel Dunbar d745976d36 Access pass manager consistently.
- No functionality change.

llvm-svn: 58342
2008-10-28 19:23:05 +00:00
Daniel Dunbar 5fd9ac230b 80-col fixes.
llvm-svn: 58341
2008-10-28 19:12:58 +00:00
Dan Gohman e750bb67ee Protect the code for fast-isel debugging with #ifndef NDEBUG.
llvm-svn: 58340
2008-10-28 19:08:46 +00:00
Dan Gohman f15195d8a9 Add some more information to the top-level comment for this file.
llvm-svn: 58339
2008-10-28 18:47:37 +00:00
Jim Grosbach ff2b4948ce Support for constant islands in the ARM JIT.
Since the ARM constant pool handling supercedes the standard LLVM constant
pool entirely, the JIT emitter does not allocate space for the constants,
nor initialize the memory. The constant pool is considered part of the 
instruction stream.

Likewise, when resolving relocations into the constant pool, a hook into
the target back end is used to resolve from the constant ID# to the
address where the constant is stored.

For now, the support in the ARM emitter is limited to 32-bit integer. Future
patches will expand this to the full range of constants necessary.

llvm-svn: 58338
2008-10-28 18:25:49 +00:00
Torok Edwin df851ff94f fix prototype of print, it is (llvm/Pass.h):
virtual void print(std::ostream &O, const Module *M) const;
instead of
  virtual void print(llvm::OStream &O, const Module *M) const;
as the docs say

llvm-svn: 58337
2008-10-28 17:29:23 +00:00
Evan Cheng c0468cf03c Avoid calls to setSubgraphColor in release mode. They generate lots of error messages and slow down compilation.
llvm-svn: 58336
2008-10-28 17:23:13 +00:00
Tanya Lattner e660fa88ee Do not allow a user to set the operand for a constant.
llvm-svn: 58335
2008-10-28 17:22:40 +00:00
Torok Edwin 7b747ef017 fix duplicate anchor names, and broken anchor links from the TOC
llvm-svn: 58332
2008-10-28 16:54:34 +00:00
Douglas Gregor f19b2319c9 Rename ExplicitCCastExpr to CStyleCastExpr
llvm-svn: 58331
2008-10-28 15:36:24 +00:00
Douglas Gregor d984d30731 Replace a dyn_cast with a cast when we know the exact type
llvm-svn: 58330
2008-10-28 15:29:51 +00:00
Duncan Sands 4068a7f31e Fix darwin ppc llvm-gcc build breakage: intercept
ppcf128 to i32 conversion and expand it into a code
sequence like in LegalizeDAG.  This needs custom
ppc lowering of FP_ROUND_INREG, so turn that on and
make it work with LegalizeTypes.  Probably PPC should
simply custom lower the original conversion.

llvm-svn: 58329
2008-10-28 15:00:32 +00:00
Duncan Sands b68694f17d Turn off LegalizeTypes for this test for the
moment, while waiting for a proper solution.

llvm-svn: 58324
2008-10-28 09:55:04 +00:00
Duncan Sands f3e5850f80 Fix a testcase provided by Bill in which the node
id could end up being wrong mostly because of
forgetting to remap new nodes that morphed into
processed nodes through CSE.

llvm-svn: 58323
2008-10-28 09:38:36 +00:00
Zhongxing Xu c3c104ec9c Add newline.
llvm-svn: 58322
2008-10-28 09:32:08 +00:00
Zhongxing Xu c94dce9f95 Update random notes.
llvm-svn: 58321
2008-10-28 09:09:48 +00:00
Chris Lattner 5fa1040130 Don't produce invalid comparisons after legalize.
llvm-svn: 58320
2008-10-28 07:11:07 +00:00
Chris Lattner 56d016ab05 fix some whitespace stuff
llvm-svn: 58319
2008-10-28 07:10:51 +00:00
Chris Lattner a2422d8f3e fit in 80 cols
llvm-svn: 58318
2008-10-28 06:20:17 +00:00