Commit Graph

63984 Commits

Author SHA1 Message Date
Evan Cheng d2919a1773 Fix up ARM constant island pass for Thumb2.
Also fixed up code to fully use the SoImm field for ADR on ARM mode.

llvm-svn: 76890
2009-07-23 18:27:47 +00:00
Evan Cheng 95a73e2eab Since we have moved unified assembly, switch to ADR instruction instead of a the difficult-to-read .set + add syntax to materialize pc-relative address.
Turns out this also fixed a poor code selection on Thumb1. I have no idea why we were using a mov + add to do the same thing as ADR before.

llvm-svn: 76889
2009-07-23 18:26:03 +00:00
Daniel Dunbar 5bf72e20eb Convert StringMap to using StringRef for its APIs.
- Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.

llvm-svn: 76888
2009-07-23 18:17:34 +00:00
Daniel Dunbar 07b749230c Switch the driver back to always using clang-cc by default (for C++, and
regardless of the architecture).
 - This is a good default for development & testing; for example without this
   any tests using 'clang' in the test suite will fail on PowerPC, since the
   driver will avoid using clang.

 - We don't want to actually ship something built this way, but that should be
   handled via some sort of configuration file.

llvm-svn: 76886
2009-07-23 17:48:59 +00:00
Daniel Dunbar 635d481de0 Simplify.
llvm-svn: 76885
2009-07-23 17:33:49 +00:00
Anders Carlsson d78fc89fcb We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.
llvm-svn: 76884
2009-07-23 17:24:40 +00:00
David Goodwin 6deba28c6f Fix frame index elimination to correctly handle thumb-2 addressing modes that don't allow negative offsets. During frame elimination convert *i12 opcode to a *i8 when necessary due to a negative offset.
llvm-svn: 76883
2009-07-23 17:06:46 +00:00
Anders Carlsson 8af896c10a Move the LLVM field number for bit fields into the BitFieldInfo structure, since it's meaning is completely different than for non-bit fields.
llvm-svn: 76882
2009-07-23 17:01:21 +00:00
Douglas Gregor 27bdf00fd7 Clean up the ActOnTag action, so that there is only a single entry
point that covers templates and non-templates. This should eliminate
the flood of warnings I introduced yesterday.

Removed the ActOnClassTemplate action, which is no longer used.

llvm-svn: 76881
2009-07-23 16:36:45 +00:00
Andreas Bolka dcb9f483bf FileCheck'ize and expand LDA testcases.
llvm-svn: 76880
2009-07-23 15:56:53 +00:00
Andrew Lenharth 57e9daaf33 emit simple node was using different labels for fields than the rest of the graph writter
llvm-svn: 76879
2009-07-23 15:24:38 +00:00
Douglas Gregor 2aff97c9e6 Unbreak the CMake build
llvm-svn: 76878
2009-07-23 15:15:06 +00:00
Andreas Bolka c8cd3f6959 Cache dependence computation using FoldingSet.
This introduces an LDA-internal DependencePair class. The intention is,
that this is a place where dependence testers can store various results
such as SCEVs describing conflicting iterations, breaking conditions,
distance/direction vectors, etc.

llvm-svn: 76877
2009-07-23 14:32:46 +00:00
Zhongxing Xu ee5d708e55 Add two nodes to the call graph:
- Root is the main function or 0.
 - ExternalCallingNode has edges to all external functions.

llvm-svn: 76876
2009-07-23 13:39:38 +00:00
Zhongxing Xu a598e5c9d5 Add template specializations to view the call graph in dot format.
- change the DenseMap used in callgraph to std::map, since DenseMap cannot
   be used with mapped_iterator and friends.

llvm-svn: 76874
2009-07-23 09:04:23 +00:00
Zhongxing Xu fdd52922c2 constify methods.
llvm-svn: 76873
2009-07-23 08:32:25 +00:00
Evan Cheng edda8cbfad 80 col violation.
llvm-svn: 76872
2009-07-23 07:58:08 +00:00
Zhongxing Xu ef5cfd43b3 Add getter methods.
llvm-svn: 76871
2009-07-23 07:37:14 +00:00
Daniel Dunbar 3cdf80589f Add newline at EOF.
llvm-svn: 76870
2009-07-23 07:07:43 +00:00
Chris Lattner 7b9dda45f0 enhance DepthFirstIterator to support more robust operations in the face
of code mutating the graph while it is being traversed.  Patch by 
Olaf Krzikalla!

llvm-svn: 76869
2009-07-23 06:30:28 +00:00
Chris Lattner 7413f07b9d testcase for PR4590
llvm-svn: 76868
2009-07-23 06:07:59 +00:00
Chris Lattner 88ab854873 refactor a blob of code out to a new 'FoldOrOfFCmps' function and
simplify it.

llvm-svn: 76866
2009-07-23 05:46:22 +00:00
Lang Hames 077415e84b For real this time: PHI Def & Kill tracking added to PHIElimination.
llvm-svn: 76865
2009-07-23 05:44:24 +00:00
Chris Lattner 7152d39d6d merge vector-casts-0.ll into vector-casts.ll
llvm-svn: 76864
2009-07-23 05:33:39 +00:00
Chris Lattner 7d55541e56 Make some existing optimizations that would only trigger on scalars
also apply to vectors.  This allows us to compile this:

#include <emmintrin.h>
__m128i a(__m128 a, __m128 b) { return a==a & b==b; }
__m128i b(__m128 a, __m128 b) { return a!=a | b!=b; }

to:

_a:
	cmpordps	%xmm1, %xmm0
	ret
_b:
	cmpunordps	%xmm1, %xmm0
	ret

with clang instead of to a ton of horrible code.

llvm-svn: 76863
2009-07-23 05:32:17 +00:00
Daniel Dunbar 7c02cf609d Shield clang from LLVM API changes, until the dust settles.
llvm-svn: 76862
2009-07-23 05:30:36 +00:00
Chris Lattner b4ff7de8bd convert a test to filecheck format. This fixes an endemic problem
with negative tests: this test wasn't checking what it thought it was
because it was grepping .bc, not .ll.

llvm-svn: 76861
2009-07-23 05:27:48 +00:00
Chris Lattner 4a3affbdcf rename test
llvm-svn: 76860
2009-07-23 05:25:12 +00:00
Chris Lattner 9085438e4b refactor a bunch of code out into a helper function,
no functionality change.

llvm-svn: 76859
2009-07-23 05:14:02 +00:00
Daniel Dunbar 34169976d0 Fix test case, which has a control-reaches-end-of-non-void warning that was
being masked by previous bug.

llvm-svn: 76858
2009-07-23 05:06:51 +00:00
Daniel Dunbar a2f7c95dca Use llvm::BitVector instead of managing memory by hand.
- As it happens, this also fixes a use-of-uninitialized memory that was causing
   non-deterministic test failures.

llvm-svn: 76857
2009-07-23 05:01:54 +00:00
Anders Carlsson f55922b8b8 Set field info for unions.
llvm-svn: 76856
2009-07-23 04:59:05 +00:00
Chris Lattner 02def54fa1 remove a really old and dead header
llvm-svn: 76855
2009-07-23 04:59:02 +00:00
Anders Carlsson 718a89a501 Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.
llvm-svn: 76854
2009-07-23 04:50:01 +00:00
Chris Lattner dc13b7c637 merge one more sse41 test into sse41.ll
llvm-svn: 76853
2009-07-23 04:49:39 +00:00
Chris Lattner 70d5783535 merge another sse41 test into sse41.ll
llvm-svn: 76852
2009-07-23 04:43:48 +00:00
Daniel Dunbar 8e31e77fd8 Revert r76831, there are many Analyzer test failures on multiple platforms.
--- Reverse-merging r76831 into '.':
U    include/clang/Analysis/PathSensitive/GRExprEngine.h
U    lib/Analysis/GRExprEngine.cpp

llvm-svn: 76851
2009-07-23 04:41:06 +00:00
Chris Lattner 08fc6e6e40 merge sse41-pmovx.ll into sse41.ll
llvm-svn: 76850
2009-07-23 04:39:09 +00:00
Lang Hames a77a3c3782 Added PHI Def & Kill tracking to PHIElimination pass.
llvm-svn: 76849
2009-07-23 04:34:03 +00:00
Chris Lattner b9cdd3153c change a test to run in filecheck style. Rename it to be a general
dumping ground of various SSE4.1 tests, since filecheck can reasonably
handle them all in one file.  Generalize it to check x86-64 stuff as
well since it has a different ABI (a convenient way to test both the 
reg and mem forms of these instructions).

llvm-svn: 76848
2009-07-23 04:33:02 +00:00
Anders Carlsson f814ee6003 Handle zero width bit fields in unions correctly (by ignoring them).
llvm-svn: 76847
2009-07-23 04:00:39 +00:00
Anders Carlsson 697f65943d Implement union layout support.
llvm-svn: 76846
2009-07-23 03:43:54 +00:00
Anders Carlsson 307846fe67 Check in CGRecordLayoutBuilder which is a reimplementation of the record layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :)
llvm-svn: 76845
2009-07-23 03:17:50 +00:00
Daniel Dunbar a244814e6f These IRgen improvements have been done.
Technically we could still do a bit more to avoid deferred generation of statics
which we know are used, but I seriously doubt this is important.

llvm-svn: 76844
2009-07-23 03:03:07 +00:00
Eric Christopher b1b77ca862 Support insertps via the intrinsic and add a couple of simple
testcases to make sure it's being generated.

llvm-svn: 76843
2009-07-23 02:22:41 +00:00
Sanjiv Gupta 56df1e7969 Do not call getMangledName on Intrinsics.
llvm-svn: 76842
2009-07-23 02:11:04 +00:00
Devang Patel 6292003492 MDString
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.

llvm-svn: 76841
2009-07-23 02:00:51 +00:00
Eric Christopher 327cb795a1 Add test for pinsrd and pinsrb instructions.
llvm-svn: 76840
2009-07-23 01:58:04 +00:00
Andreas Bolka 897e68c660 Minor cosmetics: indentation, formatting, naming.
llvm-svn: 76839
2009-07-23 01:57:06 +00:00
Reid Kleckner 921673225c Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
llvm-svn: 76838
2009-07-23 01:40:54 +00:00