Commit Graph

47181 Commits

Author SHA1 Message Date
Daniel Dunbar c722b8565c Refactor handling of calls:
- Added CodeGenFunction::EmitCall which just takes the callee, return
   type, and a list of (Value*,QualType) pairs.
 - Added CodeGenFunction::EmitCallArg which handles emitting code for
   a call argument and turning it into an appropriate
   (Value*,QualType) pair.
 - Changed Objective-C runtime interface so that the actual emission
   of arguments for message sends is (once again) done in the code to
   emit a message send.

No intended functionality change, this is prep work for better ABI
support and for Objective-C property setter support.

llvm-svn: 55560
2008-08-30 03:02:31 +00:00
Daniel Dunbar c62cf79290 Add newline at end of file.
llvm-svn: 55559
2008-08-30 02:06:22 +00:00
Evan Cheng cfb7f3abdf Transform (x << (y&31)) -> (x << y). This takes advantage of the fact x86 shift instructions 2nd operand (shift count) is limited to 0 to 31 (or 63 in the x86-64 case).
llvm-svn: 55558
2008-08-30 02:03:58 +00:00
Daniel Dunbar 8eec985ac7 Enable -fvisibility-inlines-hidden by default for compilers which
support it.

llvm-svn: 55557
2008-08-30 01:16:19 +00:00
Dale Johannesen 35c2abf4c2 Testcases for ppc atomics.
llvm-svn: 55556
2008-08-30 00:54:31 +00:00
Owen Anderson 6f0c51d9da Fix an issue where a use might be selected before a def, and then we didn't respect the pre-chosen vreg
assignment when selecting the def.  This is the naive solution to the problem: insert a copy to the pre-chosen
vreg.  Other solutions might be preferable, such as:
  1) Passing the dest reg into FastEmit_.  However, this would require the higher level code to know about reg classes, which they don't currently.
  2) Selecting blocks in reverse postorder.  This has some compile time cost for computing the order, and we'd need to measure its impact.

llvm-svn: 55555
2008-08-30 00:38:46 +00:00
Dale Johannesen 340d264f52 Add ppc partial-word ATOMIC_CMP_SWAP.
llvm-svn: 55554
2008-08-30 00:08:53 +00:00
Evan Cheng 3fddc7e906 Swap fp comparison operands and change predicate to allow load folding (safely this time).
llvm-svn: 55553
2008-08-29 23:22:12 +00:00
Evan Cheng f93bc7f755 Use static_cast instead of C style cast.
llvm-svn: 55552
2008-08-29 23:21:31 +00:00
Evan Cheng 894be333f1 Fix 80 col. violations.
llvm-svn: 55551
2008-08-29 23:20:46 +00:00
Evan Cheng 0b82607fa1 xfail this.
llvm-svn: 55550
2008-08-29 22:59:13 +00:00
Evan Cheng 5e7658c2e4 Back out 55498. It broken Apple style bootstrapping.
llvm-svn: 55549
2008-08-29 22:21:44 +00:00
Evan Cheng b3ed09703c Backing out 55521. Not safe.
llvm-svn: 55548
2008-08-29 22:13:21 +00:00
Daniel Dunbar 2e5225818a Improve ccc:
- Support environment variable CCC_LANGUAGES to control which
   languages clang is invoked on. If unset clang is invoked for all
   languages, otherwise CCC_LANGUAGES should be a comma separated list
   of the languages (as accepted by -x) for which clang should be
   invoked. Useful for only building C and Objective-C parts of a
   project with clang, for example.

 - Add environment variable CCC_FALLBACK. If set and non-empty then
   ccc will try and compile using the regular compiler if compilation
   with clang fails.

 - A few other tweaks to add options, flush stdout, recognize .mm as
   objective-c++, and infer languages for compile+link style
   invocations.

llvm-svn: 55547
2008-08-29 21:03:27 +00:00
Dale Johannesen f0a88d6b2a Add partial word version of ATOMIC_SWAP.
llvm-svn: 55546
2008-08-29 18:29:46 +00:00
Owen Anderson 0673a8af14 Add initial support for fast isel of instructions that have inputs pinned to physical registers.
llvm-svn: 55545
2008-08-29 17:45:56 +00:00
Daniel Dunbar a799807dea Downgrade a number of FIXME asserts to ErrorUnsupported.
- Notably VLAs

llvm-svn: 55544
2008-08-29 17:28:43 +00:00
Nico Weber febdb0bc46 fix a comment that was forgotten in r54071
llvm-svn: 55543
2008-08-29 17:24:46 +00:00
Chris Lattner b1a635b30c regenerate
llvm-svn: 55542
2008-08-29 17:20:18 +00:00
Chris Lattner b25e5eab23 Asmprint nameless instructions as:
%4 = add ...

instead of:

add ...    ; 4

This makes opt -print-cfg output actually usable and makes .ll files
generally easier to read.  This fixes PR2480

llvm-svn: 55541
2008-08-29 17:19:30 +00:00
Chris Lattner 9fc9d2ec3b allow this to pass.
llvm-svn: 55540
2008-08-29 17:18:26 +00:00
Chris Lattner a51c7030e2 Add support for parsing .ll files that have numbers in front of
nameless values, such as:

%3 = add i32 4, 2

This fixes the first half of PR2480

llvm-svn: 55539
2008-08-29 17:12:13 +00:00
Nico Weber fa5856a936 minor cleanup
llvm-svn: 55538
2008-08-29 17:02:23 +00:00
Zhongxing Xu 4c23963de8 Added LLVM comment header.
llvm-svn: 55537
2008-08-29 15:09:12 +00:00
Zhongxing Xu c1bd3a5f8b Migrate the rest symbolic analysis stuff to BasicConstraintManager.
llvm-svn: 55536
2008-08-29 14:52:36 +00:00
Daniel Dunbar 9e22c0d317 Add special "property reference" CodeGen::LValue type for emitting
Objective-C property references.
 - This handles property references "more correctly" but setters still
   don't work.

llvm-svn: 55534
2008-08-29 08:11:39 +00:00
Evan Cheng 44b2138b9a TableGen'ing instruction encodings.
llvm-svn: 55533
2008-08-29 07:42:03 +00:00
Evan Cheng c139c221dd addrmode1 (data processing) instruction encoding: bits 5-6 are 0, bits 7-10 encode the opcode.
llvm-svn: 55531
2008-08-29 07:40:52 +00:00
Evan Cheng 9f717afd68 MVN is addrmode1.
llvm-svn: 55530
2008-08-29 07:36:24 +00:00
Daniel Dunbar 278e909124 Add GlobalValue::{removeFromParent,eraseFromParent}
llvm-svn: 55529
2008-08-29 07:30:15 +00:00
Evan Cheng ee98fa9db2 More refactoring.
llvm-svn: 55528
2008-08-29 06:41:12 +00:00
Ted Kremenek 5043680da4 Remove dead method.
llvm-svn: 55526
2008-08-29 03:55:31 +00:00
Daniel Dunbar 9a0ea046db Add newline to end of file.
llvm-svn: 55525
2008-08-29 03:45:59 +00:00
Daniel Dunbar a545f466e8 Add utils/FindSpecRefs, Python script for generating specification
references HTML page.

llvm-svn: 55524
2008-08-29 01:07:08 +00:00
Daniel Dunbar c70fa60b5e Add DenseMap::lookup:
/// lookup - Return the entry for the specified key, or a default
  /// constructed value if no such entry exists.

llvm-svn: 55523
2008-08-29 00:48:44 +00:00
Ted Kremenek c83e755d78 Added "getBindings" and "BindingAsString" to GRStateManager and StoreManager.
Migrated CFRefCount.cpp to use getBindings and BindingsAsString instead of
making assumptions about the Store (removed dependence on GRState::vb_iterator).

llvm-svn: 55522
2008-08-29 00:47:32 +00:00
Evan Cheng 960b17a3c2 Swap fp comparison operands and change predicate to allow load folding.
llvm-svn: 55521
2008-08-28 23:48:31 +00:00
Ted Kremenek f011e10d6a Remove BasicStore.h from Xcode project.
llvm-svn: 55520
2008-08-28 23:40:08 +00:00
Ted Kremenek 5909059524 Remove BasicStore.h (migrated function prototype for CreateBasicStore() to Store.h)
llvm-svn: 55519
2008-08-28 23:39:42 +00:00
Evan Cheng 2d37f19ef2 Refactor ARM instruction format definitions into a separate file. No functionality changes.
llvm-svn: 55518
2008-08-28 23:39:26 +00:00
Ted Kremenek 4360f3b553 Remove Regions.cpp from VS project file.
llvm-svn: 55517
2008-08-28 23:34:54 +00:00
Ted Kremenek 85a401ea15 Removed Regions.[h,cpp] from the Xcode project.
llvm-svn: 55516
2008-08-28 23:33:36 +00:00
Ted Kremenek 75d2ac956f Remove Regions.h and Regions.cpp, since we are now using an even more abstract representation of "memory regions" in the static analyzer.
llvm-svn: 55515
2008-08-28 23:32:43 +00:00
Ted Kremenek e91874f71f Make store "Regions" and "Bindings" more abstract instead of concrete variants.
Their precise semantics will be implemented by a specific StoreManager.

Use function pointer to create the StoreManager in GRStateManager.  This matches how we create ConstraintsManager.

llvm-svn: 55514
2008-08-28 23:31:31 +00:00
Daniel Dunbar 5888e603c3 Allow 'make TESTDIRS=Sema' in test/ directory for only running a
subset of tests.

llvm-svn: 55513
2008-08-28 23:28:16 +00:00
Dan Gohman d58f3e36d0 Add a target callback for FastISel.
llvm-svn: 55512
2008-08-28 23:21:34 +00:00
Gabor Greif 95d77f5466 remove tabs, fix > 80 cols
llvm-svn: 55511
2008-08-28 23:19:51 +00:00
Bill Wendling a4fe47e4cc Add another description to my entry.
llvm-svn: 55510
2008-08-28 23:16:37 +00:00
Gabor Greif 76a6d27a71 just a brain dump for a small tool
that brings us to 80-col violations
or tabs.

Usage:
  visit-violations <file>

At the moment it outputs editor invocations.

llvm-svn: 55509
2008-08-28 23:15:28 +00:00
Chris Lattner e6fe88391a rename destroy -> releaseMemory to properly hook into passmgr.
llvm-svn: 55508
2008-08-28 22:56:53 +00:00