Commit Graph

103475 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 7067bff976 Use X0 instead of R0 for the zero register on ppc64.
The 32-bit R0 cannot be used where a 64-bit register is expected.

llvm-svn: 128828
2011-04-04 17:07:06 +00:00
Jakob Stoklund Olesen 218661346a Fix PowerPC tests to be register allocator independent.
llvm-svn: 128827
2011-04-04 17:07:03 +00:00
Joerg Sonnenberger fc4789da4a Add support for the VIA PadLock instructions.
llvm-svn: 128826
2011-04-04 16:58:13 +00:00
Bob Wilson e3a15fed08 Change ARM data layout strings to match llvm-gcc.
Sandeep Patel noticed that the alignment was wrong for Neon vector types,
and this change is partly derived from his patch.  For the APCS ABI, however,
additional changes were required: the maximum ABI alignment is 32 bits and
the preferred alignment for i64 and f64 types should be 64 bits.

llvm-svn: 128825
2011-04-04 16:53:11 +00:00
Joerg Sonnenberger c94780c539 Use array_lengthof
llvm-svn: 128823
2011-04-04 16:25:38 +00:00
Joerg Sonnenberger cc53d9919f Expand Op0Mask by one bit in preparation for the PadLock prefixes.
Define most shift masks incrementally to reduce the redundant
hard-coding. Introduce new shift for the VEX flags to replace the
magic constant 32 in various places.

llvm-svn: 128822
2011-04-04 15:58:30 +00:00
Jakob Stoklund Olesen 8933907b51 Stop caching basic block index ranges now that SlotIndexes can keep up.
llvm-svn: 128821
2011-04-04 15:32:15 +00:00
Jakob Stoklund Olesen 956ae3da41 Delete leftover data members.
llvm-svn: 128820
2011-04-04 15:32:11 +00:00
NAKAMURA Takumi ce60187a89 docs/UsersManual.html: Add cygming notes.
llvm-svn: 128819
2011-04-04 15:02:41 +00:00
Joerg Sonnenberger fb3bce155e Change loops to derive the number of tables automatically
llvm-svn: 128818
2011-04-04 14:42:22 +00:00
Duncan Sands 1cd7898dc1 Dragonegg release notes.
llvm-svn: 128812
2011-04-04 11:09:08 +00:00
Jay Foad 11522097be Remove some support for ReturnInsts with multiple operands, and for
returning a scalar value in a function whose return type is a single-
element structure or array.

llvm-svn: 128810
2011-04-04 07:44:02 +00:00
Eli Friedman 72adff255e PR9585: add __decltype as a keyword. While I'm here, alphabetize the list.
llvm-svn: 128809
2011-04-04 07:19:40 +00:00
Tobias Grosser 8b304ff9ac Region: Allow user control the printing style of the print function.
Contributed by: etherzhhb@gmail.com

llvm-svn: 128808
2011-04-04 07:19:18 +00:00
Howard Hinnant e4b11156d7 Corrected tests for http://llvm.org/bugs/show_bug.cgi?id=9351
llvm-svn: 128807
2011-04-04 01:42:30 +00:00
Eli Friedman 2d9c47ea6c PR9615: make sure we destroy any temporaries returned by operator->.
I'm pretty sure this is the right fix, but I would appreciate it if someone
else would double-check.

llvm-svn: 128806
2011-04-04 01:18:25 +00:00
Peter Collingbourne 2642d34551 IntrusiveRefCntPtr: in RefCountedBase and RefCountedBaseVPTR, make
ref_cnt mutable and Retain/Release const to enable reference counted
pointers to const objects

llvm-svn: 128804
2011-04-04 00:57:03 +00:00
Eli Friedman b85c0caf7d Attempt to fix breakage from r128782 reported by Francois Pichet on
llvm-commits.  (Not sure why it only breaks on Windows; maybe it has
something to do with the iterator representation...)

llvm-svn: 128802
2011-04-04 00:37:38 +00:00
Eric Christopher 19ea5ae81a Start migrating mach-o dumping facilities to the object file out of a
separate executable.

llvm-svn: 128801
2011-04-03 23:51:47 +00:00
Eric Christopher c56d2e8fd0 Move Object.cpp out of VMCore and into Object.
llvm-svn: 128800
2011-04-03 23:07:51 +00:00
Eric Christopher ee066fc4f3 Assorted bugfixes in object file handling:
- Adds support for sniffing PE/COFF files on win32 (.exe and .dll)
   which are COFF files that have an MS-DOS compatibility stub on
   the front of them.

 - Fixes a bug in the COFFObjectFile's support for the Microsoft COFF
   extension for long symbol names, wherein it was attempting to parse
   the leading '/' in an extended symbol name reference as part of the
   integer offset.

 - Fixes bugs in COFFObjectFile and ELFObjectFile wherein section
   and symbol iterators were being returned with uninitialized bytes;
   the type DataRefImpl is a union between 2 32-bit words (d.a and d.b)
   and a single intptr_t word (p). Only p was being initialized, so in
   32-bit builds the result would be iterators with random upper 32-bit
   words in their DataRefImpls. This caused random failures when
   seeking around in object files.

Patch by Graydon Hoare!

llvm-svn: 128799
2011-04-03 22:53:19 +00:00
Eric Christopher 9f08a3bbf4 Add a set of C bindings for the Object interface.
Patch by Patrick Walton!

llvm-svn: 128798
2011-04-03 22:34:07 +00:00
Howard Hinnant e4bafbee25 ... And these wonderful tests.
llvm-svn: 128797
2011-04-03 20:06:31 +00:00
Howard Hinnant dbe14303da Chris Jefferson submitted this patch to fix http://llvm.org/bugs/show_bug.cgi?id=9351
llvm-svn: 128796
2011-04-03 20:05:29 +00:00
Frits van Bommel 614a2fdbd1 Remove the LLVMContext& arguments from *Folder constructors, as they don't seem to be used anywhere.
llvm-svn: 128793
2011-04-03 19:46:28 +00:00
Oscar Fuentes 8b29cf50ed Fix typos on LLVM.cmake. Export LLVM_ON_UNIX & LLVM_ON_WIN32.
Patch by arrowdodger!

llvm-svn: 128789
2011-04-03 16:12:38 +00:00
Richard Smith 13f68cf53e clang has had full and tested support for C++0x trailing-return-type and auto type deduction since r126166. Update the website to reflect this, and add a __has_feature test.
trailing-return-type codegen is not tested yet (name mangling in particular).

llvm-svn: 128787
2011-04-03 14:12:46 +00:00
Lenny Maiorani fca2e9618a Refactoring the security checker a little bit so that each CallExpr check doesn't get called for each CallExpr. Instead it does a switch and only runs the check for the proper identifier. Slight speed improvement (probably significant on very large ASTs), and should make it easier and more clear to add more checks for other CallExpr's later.
llvm-svn: 128785
2011-04-03 05:07:11 +00:00
Ted Kremenek a95594416e static analyzer: Add a new ProgramPoint PostCondition to represent the post position of a branch condition, and a new generateNode method to BranchNodeBuilder using PostCondition ProgramPoint. This method generates a new ExplodedNode but not a new block edge.
Patch by Lei Zhang!

llvm-svn: 128784
2011-04-03 04:34:49 +00:00
Ted Kremenek 850d35be16 Fix RegionStore bug when doing a field load whose parent is also a field assigned a LazyCompoundValue. Fixes <rdar://problem/9163742> and PR 9522.
llvm-svn: 128783
2011-04-03 04:09:15 +00:00
Eli Friedman 17bf4922c9 PR9446: RecursivelyDeleteTriviallyDeadInstructions can delete the instruction
after the given instruction; make sure to handle that case correctly.
(It's difficult to trigger; the included testcase involves a dead 
block, but I don't think that's a requirement.) 

While I'm here, get rid of the unnecessary warning about
SimplifyInstructionsInBlock, since it should work correctly as far as I know.

llvm-svn: 128782
2011-04-02 22:45:17 +00:00
Eli Friedman 8baa2c7ad9 Don't assume something which might be a constant expression is an instruction.
Based on PR9429, but no testcase because I can't figure out how to trigger it
anymore given other changes to the relevant code.

llvm-svn: 128781
2011-04-02 22:11:56 +00:00
Nico Weber cc2b8717c5 Make -Wheader-hygiene not complain about USING_NAMESPACE_THROUGH_MACRO in a non-header file.
llvm-svn: 128780
2011-04-02 19:45:15 +00:00
Argyrios Kyrtzidis 6402c97eed [analyzer] Simplify CheckerFn template and use it more to reduce duplication. No functionality change.
llvm-svn: 128779
2011-04-02 19:37:26 +00:00
Benjamin Kramer 50a281a871 While SimplifyDemandedBits constant folds this, we can't rely on it here.
It's possible to craft an input that hits the recursion limits in a way
that SimplifyDemandedBits doesn't simplify the icmp but ComputeMaskedBits
can infer which bits are zero.

No test case as it depends on too many other things. Fixes PR9609.

llvm-svn: 128777
2011-04-02 18:50:58 +00:00
Ken Dyck 1473c9a7c4 Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to
CharUnits. No change in functionality intended.

llvm-svn: 128776
2011-04-02 17:52:22 +00:00
Ken Dyck 1b23db93df Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. No
change in functionality intended.

llvm-svn: 128773
2011-04-02 17:13:02 +00:00
Ken Dyck cf4ef5314f Use CharUnits for the offset type in the ClassNamesAndOffsets map in
dumpLayout(). No change in functionality intended.

llvm-svn: 128771
2011-04-02 17:03:24 +00:00
Ken Dyck 1eac9f1546 Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No
change in functionality intended.

llvm-svn: 128770
2011-04-02 16:57:20 +00:00
Oscar Fuentes f2ab92833a Handle changing of LLVM_ENABLE_FFI.
If someone first configure build with LLVM_ENABLE_FFI=1 and then turn it
off, the build will fail in lib/ExecutionEngine/Interpreter because
Interpreter will try still to #include <ffi/ffi.h>, but there are no
include_directories(${FFI_INCLUDE_DIR}) now.

This patch unset()'s HAVE_FFI_H and HAVE_FFI_FFI_H from cache file if
LLVM_ENABLE_FFI=0. This forces CMake to update config.h.

Patch by arrowdodger!

llvm-svn: 128769
2011-04-02 13:21:12 +00:00
Chandler Carruth f20ec92331 Apply a bug-fix patch from Marcin Kowalczyk to the source locations for
a couple of operator overloads which form interesting expressions in the
AST.

I added test cases for both bugs with the c-index-test's token
annotation feature. Also, thanks to John McCall for confirming that this
is the correct solution.

llvm-svn: 128768
2011-04-02 09:47:38 +00:00
Che-Liang Chiou e34b271718 ptx: support setp's 4-operand format
llvm-svn: 128767
2011-04-02 08:51:39 +00:00
Jakob Stoklund Olesen ca26e0acbb Use InterferenceCache in RegAllocGreedy.
llvm-svn: 128765
2011-04-02 06:03:38 +00:00
Jakob Stoklund Olesen 91cbcaf957 Add an InterferenceCache class for caching per-block interference ranges.
When the greedy register allocator is splitting multiple global live ranges, it
tends to look at the same interference data many times. The InterferenceCache
class caches queries for unaltered LiveIntervalUnions.

llvm-svn: 128764
2011-04-02 06:03:35 +00:00
Jakob Stoklund Olesen 36171288ce Use basic block numbers as indexes when mapping slot index ranges.
This is more compact and faster than using DenseMap.

llvm-svn: 128763
2011-04-02 06:03:31 +00:00
Zhongxing Xu af2371e368 Remove a redundant method. We have a const version.
llvm-svn: 128762
2011-04-02 03:20:45 +00:00
Ted Kremenek 8f89f7c893 Teach IdempotentOperationsChecker about paths aborted because ExprEngine didn't know how to handle a specific Expr type.
llvm-svn: 128761
2011-04-02 02:56:23 +00:00
Ted Kremenek c703a666f7 static analyzer: Rename 'BlocksAborted' to 'BlocksExhausted' to reflect that a given CFGBlock was analyzed too many times.
llvm-svn: 128760
2011-04-02 02:56:17 +00:00
Cameron Zwarich 6fe5c29430 Do some peephole optimizations to remove pointless VMOVs from Neon to integer
registers that arise from argument shuffling with the soft float ABI. These
instructions are particularly slow on Cortex A8. This fixes one half of
<rdar://problem/8674845>.

llvm-svn: 128759
2011-04-02 02:40:43 +00:00
Cameron Zwarich 8c7bbc09e2 Add a RemoveFromWorklist method to DCI. This is needed to do some complicated
transformations in target-specific DAG combines without causing DAGCombiner to
delete the same node twice. If you know of a better way to avoid this (see my
next patch for an example), please let me know.

llvm-svn: 128758
2011-04-02 02:40:26 +00:00