platform/upstream/llvm.git
15 years agoConvert a test to FileCheck.
Evan Cheng [Fri, 24 Jul 2009 06:01:46 +0000 (06:01 +0000)]
Convert a test to FileCheck.

llvm-svn: 76954

15 years agohoist section name uniquing logic up to the top-level SectionForGlobal
Chris Lattner [Fri, 24 Jul 2009 05:10:25 +0000 (05:10 +0000)]
hoist section name uniquing logic up to the top-level SectionForGlobal
implementation, eliminating a dupe.

llvm-svn: 76953

15 years agoImplement getSectionPrefixForUniqueGlobal to return null, indicating that
Chris Lattner [Fri, 24 Jul 2009 05:02:38 +0000 (05:02 +0000)]
Implement getSectionPrefixForUniqueGlobal to return null, indicating that
darwin does it's own unique and special and wonderful thing.

llvm-svn: 76952

15 years agoreduce indentation
Chris Lattner [Fri, 24 Jul 2009 05:01:55 +0000 (05:01 +0000)]
reduce indentation

llvm-svn: 76951

15 years agosimplify code by making special case more obvious
Chris Lattner [Fri, 24 Jul 2009 04:59:43 +0000 (04:59 +0000)]
simplify code by making special case more obvious

llvm-svn: 76950

15 years agothe 'isWeakForLinker' code is common between functions and globals, hoist it
Chris Lattner [Fri, 24 Jul 2009 04:52:38 +0000 (04:52 +0000)]
the 'isWeakForLinker' code is common between functions and globals, hoist it
and simplify some other code.

llvm-svn: 76949

15 years agoReplace UniqueSectionForGlobal with getSectionPrefixForUniqueGlobal.
Chris Lattner [Fri, 24 Jul 2009 04:49:34 +0000 (04:49 +0000)]
Replace UniqueSectionForGlobal with getSectionPrefixForUniqueGlobal.
The later doesn't depend on any crazy LLVM IR stuff, and this
pulls the concatenation of prefix with GV name (the root problem behind
PR4584) out one level.

llvm-svn: 76948

15 years agoIntroduce a new variant type 'TryResult' to represent the result of
Ted Kremenek [Fri, 24 Jul 2009 04:47:11 +0000 (04:47 +0000)]
Introduce a new variant type 'TryResult' to represent the result of
TryEvaluateBool instead of using a raw 'int'.  This avoids any
confusion of how 'int' converts to bool, and makes the resultant code
easier to read.

Condense a bunch of 'addSuccessor()' calls in 'if ... else' to use the
ternary operator instead.

llvm-svn: 76947

15 years agodocument SectionFlags::Named better and make it more easily greppable by
Chris Lattner [Fri, 24 Jul 2009 04:26:19 +0000 (04:26 +0000)]
document SectionFlags::Named better and make it more easily greppable by
eliminating isNamed.

llvm-svn: 76946

15 years agofix indentation.
Chris Lattner [Fri, 24 Jul 2009 04:11:40 +0000 (04:11 +0000)]
fix indentation.

llvm-svn: 76945

15 years agouse section flags more correctly.
Chris Lattner [Fri, 24 Jul 2009 04:08:17 +0000 (04:08 +0000)]
use section flags more correctly.

llvm-svn: 76944

15 years agoSwitch to raw_ostream.
Daniel Dunbar [Fri, 24 Jul 2009 04:01:01 +0000 (04:01 +0000)]
Switch to raw_ostream.

llvm-svn: 76943

15 years agofix a mysterious and scary failure on test/CodeGen/X86/cstring.ll
Chris Lattner [Fri, 24 Jul 2009 03:55:48 +0000 (03:55 +0000)]
fix a mysterious and scary failure on test/CodeGen/X86/cstring.ll

llvm-svn: 76942

15 years agoreduce api exposure: clients shouldn't call SectionKindForGlobal directly.
Chris Lattner [Fri, 24 Jul 2009 03:49:17 +0000 (03:49 +0000)]
reduce api exposure: clients shouldn't call SectionKindForGlobal directly.

llvm-svn: 76941

15 years agoAdd getDecl() to CallGraph and CallGraphNode.
Zhongxing Xu [Fri, 24 Jul 2009 03:41:11 +0000 (03:41 +0000)]
Add getDecl() to CallGraph and CallGraphNode.

llvm-svn: 76940

15 years agoConstify methods.
Zhongxing Xu [Fri, 24 Jul 2009 03:38:27 +0000 (03:38 +0000)]
Constify methods.

llvm-svn: 76939

15 years agomake Constant::getRelocationInfo return an enum, as suggested by Duncan.
Chris Lattner [Fri, 24 Jul 2009 03:27:21 +0000 (03:27 +0000)]
make Constant::getRelocationInfo return an enum, as suggested by Duncan.

llvm-svn: 76938

15 years agoremove more bits of small section support.
Chris Lattner [Fri, 24 Jul 2009 03:16:53 +0000 (03:16 +0000)]
remove more bits of small section support.

llvm-svn: 76937

15 years agoremove more remnants of small section support.
Chris Lattner [Fri, 24 Jul 2009 03:14:35 +0000 (03:14 +0000)]
remove more remnants of small section support.

llvm-svn: 76936

15 years agoRemove SectionKind::Small*. This was only used on mips, and is apparently
Chris Lattner [Fri, 24 Jul 2009 03:11:51 +0000 (03:11 +0000)]
Remove SectionKind::Small*.  This was only used on mips, and is apparently
a sad mistake that is regretted. :)

llvm-svn: 76935

15 years agoTest commit: make a little stub routine for semantic checking of main().
John McCall [Fri, 24 Jul 2009 03:03:21 +0000 (03:03 +0000)]
Test commit:  make a little stub routine for semantic checking of main().

llvm-svn: 76934

15 years agoEnable the '-warn-security-syntactic' checker option by default.
Ted Kremenek [Fri, 24 Jul 2009 02:52:07 +0000 (02:52 +0000)]
Enable the '-warn-security-syntactic' checker option by default.

llvm-svn: 76933

15 years agoImplement new warning for functions declared 'noreturn' when they fall off the end.
Mike Stump [Fri, 24 Jul 2009 02:49:01 +0000 (02:49 +0000)]
Implement new warning for functions declared 'noreturn' when they fall off the end.

llvm-svn: 76932

15 years agoGet rid of the size parameter to AppendField. No functionality change.
Anders Carlsson [Fri, 24 Jul 2009 02:45:50 +0000 (02:45 +0000)]
Get rid of the size parameter to AppendField. No functionality change.

llvm-svn: 76931

15 years agoThumb2 should use the register scavenger.
Evan Cheng [Fri, 24 Jul 2009 01:05:51 +0000 (01:05 +0000)]
Thumb2 should use the register scavenger.

llvm-svn: 76930

15 years agoFix whitespace.
Dan Gohman [Fri, 24 Jul 2009 01:03:59 +0000 (01:03 +0000)]
Fix whitespace.

llvm-svn: 76929

15 years agoGive SCEVAddRecExpr no-signed-overflow and no-unsigned-overflow flags.
Dan Gohman [Fri, 24 Jul 2009 01:01:06 +0000 (01:01 +0000)]
Give SCEVAddRecExpr no-signed-overflow and no-unsigned-overflow flags.

llvm-svn: 76928

15 years agoGive the SCEV class a SubclassData field.
Dan Gohman [Fri, 24 Jul 2009 00:59:53 +0000 (00:59 +0000)]
Give the SCEV class a SubclassData field.

llvm-svn: 76927

15 years agoFix whitespace.
Dan Gohman [Fri, 24 Jul 2009 00:55:33 +0000 (00:55 +0000)]
Fix whitespace.

llvm-svn: 76926

15 years agoFLDD, FLDS, FCPYD, FCPYS, FSTD, FSTS, VMOVD, VMOVQ maps to the same instructions...
Evan Cheng [Fri, 24 Jul 2009 00:53:56 +0000 (00:53 +0000)]
FLDD, FLDS, FCPYD, FCPYS, FSTD, FSTS, VMOVD, VMOVQ maps to the same instructions on all sub-targets.

llvm-svn: 76925

15 years agoMark destructor of Checker virtual.
Ted Kremenek [Fri, 24 Jul 2009 00:40:31 +0000 (00:40 +0000)]
Mark destructor of Checker virtual.

llvm-svn: 76924

15 years agoAdd tests for handling of globals and tls on the XCore. These currently fail
Richard Osborne [Fri, 24 Jul 2009 00:38:20 +0000 (00:38 +0000)]
Add tests for handling of globals and tls on the XCore. These currently fail
but pass when run against r76652.

llvm-svn: 76923

15 years agoPrivatize the ConstantVector tables.
Owen Anderson [Fri, 24 Jul 2009 00:36:24 +0000 (00:36 +0000)]
Privatize the ConstantVector tables.

llvm-svn: 76922

15 years agoUpdate insertps handling based on feedback. Move to a v4f32 style
Eric Christopher [Fri, 24 Jul 2009 00:33:09 +0000 (00:33 +0000)]
Update insertps handling based on feedback.  Move to a v4f32 style
to support vector arguments and scalar arguments correctly. Update
lowering and fix comment to refer to pinsr* instead of insertps.

llvm-svn: 76921

15 years agoRemove the IA-64 backend.
Dan Gohman [Fri, 24 Jul 2009 00:30:09 +0000 (00:30 +0000)]
Remove the IA-64 backend.

llvm-svn: 76920

15 years agoCorrectly handle the Thumb-2 imm8 addrmode. Specialize frame index elimination more...
David Goodwin [Fri, 24 Jul 2009 00:16:18 +0000 (00:16 +0000)]
Correctly handle the Thumb-2 imm8 addrmode. Specialize frame index elimination more exactly for Thumb-2 to get better code gen.

llvm-svn: 76919

15 years agoWe now do complete semantic checking for unions
Douglas Gregor [Fri, 24 Jul 2009 00:05:42 +0000 (00:05 +0000)]
We now do complete semantic checking for unions

llvm-svn: 76918

15 years agoUpdate C++ status to reflect progress on out-of-line definitions of class template...
Douglas Gregor [Thu, 23 Jul 2009 23:58:15 +0000 (23:58 +0000)]
Update C++ status to reflect progress on out-of-line definitions of class template members

llvm-svn: 76917

15 years agoThis patch fixes the implementations of the __has_trivial_destructor
Douglas Gregor [Thu, 23 Jul 2009 23:49:00 +0000 (23:49 +0000)]
This patch fixes the implementations of the __has_trivial_destructor
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!

llvm-svn: 76916

15 years agoOutput UTF-16 string literals independent of host byte order.
Daniel Dunbar [Thu, 23 Jul 2009 23:41:22 +0000 (23:41 +0000)]
Output UTF-16 string literals independent of host byte order.
 - Steve, can you take a look at this? It seems like this code should live
   elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
   UTF-16 conversion.

llvm-svn: 76915

15 years agoAdded a 2+-byte NOP instruction to the Intel tables,
Sean Callanan [Thu, 23 Jul 2009 23:39:34 +0000 (23:39 +0000)]
Added a 2+-byte NOP instruction to the Intel tables,
for the assembler/disassembler to use.

llvm-svn: 76914

15 years agoDiagnose when base classes and members to be intialized
Fariborz Jahanian [Thu, 23 Jul 2009 23:32:59 +0000 (23:32 +0000)]
Diagnose when base classes and members to be intialized
with constructors don't have a matching constructor.

llvm-svn: 76913

15 years agoPrivatize the ConstantStruct table.
Owen Anderson [Thu, 23 Jul 2009 23:25:33 +0000 (23:25 +0000)]
Privatize the ConstantStruct table.

llvm-svn: 76912

15 years agoRefactor and push the evaluation as late as possible.
Mike Stump [Thu, 23 Jul 2009 23:25:26 +0000 (23:25 +0000)]
Refactor and push the evaluation as late as possible.

llvm-svn: 76911

15 years agoWrite space padding as one string to speed up comment printing.
David Greene [Thu, 23 Jul 2009 23:21:10 +0000 (23:21 +0000)]
Write space padding as one string to speed up comment printing.

llvm-svn: 76910

15 years agoThumb2 does not allow the use of "pc" register as part of the load / store address.
Evan Cheng [Thu, 23 Jul 2009 23:09:51 +0000 (23:09 +0000)]
Thumb2 does not allow the use of "pc" register as part of the load / store address.

llvm-svn: 76909

15 years agoFactor out map lookup for CFString constants.
Daniel Dunbar [Thu, 23 Jul 2009 22:52:48 +0000 (22:52 +0000)]
Factor out map lookup for CFString constants.

llvm-svn: 76908

15 years agoDon't just store the field/bit field info one field, do it for all fields in the...
Anders Carlsson [Thu, 23 Jul 2009 22:52:34 +0000 (22:52 +0000)]
Don't just store the field/bit field info one field, do it for all fields in the union.

llvm-svn: 76907

15 years agoSome cleanups suggested by Daniel.
Mike Stump [Thu, 23 Jul 2009 22:40:11 +0000 (22:40 +0000)]
Some cleanups suggested by Daniel.

llvm-svn: 76906

15 years agoImplement: <rdar://problem/6335715> rule request: gets() buffer overflow
Ted Kremenek [Thu, 23 Jul 2009 22:29:41 +0000 (22:29 +0000)]
Implement: <rdar://problem/6335715> rule request: gets() buffer overflow

llvm-svn: 76905

15 years agoFixing unittests on 32-bit Darwin, using 0x...ULL instead of 0x...U .
Reid Kleckner [Thu, 23 Jul 2009 22:27:18 +0000 (22:27 +0000)]
Fixing unittests on 32-bit Darwin, using 0x...ULL instead of 0x...U .

llvm-svn: 76904

15 years agoFix another thinko.
Anders Carlsson [Thu, 23 Jul 2009 21:52:03 +0000 (21:52 +0000)]
Fix another thinko.

llvm-svn: 76903

15 years agoRe-committing r76828 with the JIT memory manager changes now that the build
Reid Kleckner [Thu, 23 Jul 2009 21:46:56 +0000 (21:46 +0000)]
Re-committing r76828 with the JIT memory manager changes now that the build
bots like the BumpPtrAllocator changes.

llvm-svn: 76902

15 years agoAdd comments.
Ted Kremenek [Thu, 23 Jul 2009 21:44:18 +0000 (21:44 +0000)]
Add comments.

llvm-svn: 76901

15 years agoRefine checking and diagnostics for use of floating point variable as a counter.
Ted Kremenek [Thu, 23 Jul 2009 21:34:35 +0000 (21:34 +0000)]
Refine checking and diagnostics for use of floating point variable as a counter.
This implements <rdar://problem/6336718> and checks for CERT secure coding
advisory FLP30-C.

llvm-svn: 76900

15 years ago"fix" PR4612, which is a crash on:
Chris Lattner [Thu, 23 Jul 2009 21:26:18 +0000 (21:26 +0000)]
"fix" PR4612, which is a crash on:
%0 = malloc [3758096384 x i32]

The "malloc" instruction doesn't support 64-bits correctly (see PR715),
and should be removed.  Victor is actively working on fixing this, in
the meantime just don't crash.

llvm-svn: 76899

15 years agoCorrect a thinko in bitfield layout code. Fixes PR4611.
Anders Carlsson [Thu, 23 Jul 2009 21:16:33 +0000 (21:16 +0000)]
Correct a  thinko in bitfield layout code. Fixes PR4611.

llvm-svn: 76898

15 years agoSimplify, NFC.
Daniel Dunbar [Thu, 23 Jul 2009 20:38:28 +0000 (20:38 +0000)]
Simplify, NFC.

llvm-svn: 76897

15 years agoFix PR4614: the Intel C compiler defines _GNUC__
Duncan Sands [Thu, 23 Jul 2009 19:08:27 +0000 (19:08 +0000)]
Fix PR4614: the Intel C compiler defines _GNUC__
but does not provide __builtin_bswap32/64.

llvm-svn: 76896

15 years agoRevert r75581: it causes massive breakage in the Ada
Duncan Sands [Thu, 23 Jul 2009 19:00:02 +0000 (19:00 +0000)]
Revert r75581: it causes massive breakage in the Ada
testsuite, due to exception handling not working
correctly.  Maybe because the libgcc unwinder is
miscompiled - not sure, and I won't have time to
look into it before leaving on holiday.  Note that
miscompilations of libgcc are not picked up by the
nightly testers, because they dynamically link with
libgcc, so pick up the system version rather than
the version built as part of llvm-gcc.  This is a
nasty flaw in the nightly testers.  (On the other
hand the Ada testsuite links with the just built
libgcc).

llvm-svn: 76895

15 years agoSwitch ValueSymbolTable to StringRef based API.
Daniel Dunbar [Thu, 23 Jul 2009 18:52:12 +0000 (18:52 +0000)]
Switch ValueSymbolTable to StringRef based API.

llvm-svn: 76894

15 years agoAdd llvm::Value::getNameRef, for help in API migration.
Daniel Dunbar [Thu, 23 Jul 2009 18:50:53 +0000 (18:50 +0000)]
Add llvm::Value::getNameRef, for help in API migration.

llvm-svn: 76893

15 years agoRe-committing changes from r76825 to BumpPtrAllocator with a fix and tests for
Reid Kleckner [Thu, 23 Jul 2009 18:34:13 +0000 (18:34 +0000)]
Re-committing changes from r76825 to BumpPtrAllocator with a fix and tests for
an off-by-one error.

llvm-svn: 76891

15 years agoFix up ARM constant island pass for Thumb2.
Evan Cheng [Thu, 23 Jul 2009 18:27:47 +0000 (18:27 +0000)]
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

15 years agoSince we have moved unified assembly, switch to ADR instruction instead of a the...
Evan Cheng [Thu, 23 Jul 2009 18:26:03 +0000 (18:26 +0000)]
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

15 years agoConvert StringMap to using StringRef for its APIs.
Daniel Dunbar [Thu, 23 Jul 2009 18:17:34 +0000 (18:17 +0000)]
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

15 years agoSwitch the driver back to always using clang-cc by default (for C++, and
Daniel Dunbar [Thu, 23 Jul 2009 17:48:59 +0000 (17:48 +0000)]
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

15 years agoSimplify.
Daniel Dunbar [Thu, 23 Jul 2009 17:33:49 +0000 (17:33 +0000)]
Simplify.

llvm-svn: 76885

15 years agoWe don't need to keep track of the packed alignment, just whether the struct is packe...
Anders Carlsson [Thu, 23 Jul 2009 17:24:40 +0000 (17:24 +0000)]
We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.

llvm-svn: 76884

15 years agoFix frame index elimination to correctly handle thumb-2 addressing modes that don...
David Goodwin [Thu, 23 Jul 2009 17:06:46 +0000 (17:06 +0000)]
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

15 years agoMove the LLVM field number for bit fields into the BitFieldInfo structure, since...
Anders Carlsson [Thu, 23 Jul 2009 17:01:21 +0000 (17:01 +0000)]
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

15 years agoClean up the ActOnTag action, so that there is only a single entry
Douglas Gregor [Thu, 23 Jul 2009 16:36:45 +0000 (16:36 +0000)]
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

15 years agoFileCheck'ize and expand LDA testcases.
Andreas Bolka [Thu, 23 Jul 2009 15:56:53 +0000 (15:56 +0000)]
FileCheck'ize and expand LDA testcases.

llvm-svn: 76880

15 years agoemit simple node was using different labels for fields than the rest of the graph...
Andrew Lenharth [Thu, 23 Jul 2009 15:24:38 +0000 (15:24 +0000)]
emit simple node was using different labels for fields than the rest of the graph writter

llvm-svn: 76879

15 years agoUnbreak the CMake build
Douglas Gregor [Thu, 23 Jul 2009 15:15:06 +0000 (15:15 +0000)]
Unbreak the CMake build

llvm-svn: 76878

15 years agoCache dependence computation using FoldingSet.
Andreas Bolka [Thu, 23 Jul 2009 14:32:46 +0000 (14:32 +0000)]
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

15 years agoAdd two nodes to the call graph:
Zhongxing Xu [Thu, 23 Jul 2009 13:39:38 +0000 (13:39 +0000)]
Add two nodes to the call graph:
 - Root is the main function or 0.
 - ExternalCallingNode has edges to all external functions.

llvm-svn: 76876

15 years agoAdd template specializations to view the call graph in dot format.
Zhongxing Xu [Thu, 23 Jul 2009 09:04:23 +0000 (09:04 +0000)]
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

15 years agoconstify methods.
Zhongxing Xu [Thu, 23 Jul 2009 08:32:25 +0000 (08:32 +0000)]
constify methods.

llvm-svn: 76873

15 years ago80 col violation.
Evan Cheng [Thu, 23 Jul 2009 07:58:08 +0000 (07:58 +0000)]
80 col violation.

llvm-svn: 76872

15 years agoAdd getter methods.
Zhongxing Xu [Thu, 23 Jul 2009 07:37:14 +0000 (07:37 +0000)]
Add getter methods.

llvm-svn: 76871

15 years agoAdd newline at EOF.
Daniel Dunbar [Thu, 23 Jul 2009 07:07:43 +0000 (07:07 +0000)]
Add newline at EOF.

llvm-svn: 76870

15 years agoenhance DepthFirstIterator to support more robust operations in the face
Chris Lattner [Thu, 23 Jul 2009 06:30:28 +0000 (06:30 +0000)]
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

15 years agotestcase for PR4590
Chris Lattner [Thu, 23 Jul 2009 06:07:59 +0000 (06:07 +0000)]
testcase for PR4590

llvm-svn: 76868

15 years agorefactor a blob of code out to a new 'FoldOrOfFCmps' function and
Chris Lattner [Thu, 23 Jul 2009 05:46:22 +0000 (05:46 +0000)]
refactor a blob of code out to a new 'FoldOrOfFCmps' function and
simplify it.

llvm-svn: 76866

15 years agoFor real this time: PHI Def & Kill tracking added to PHIElimination.
Lang Hames [Thu, 23 Jul 2009 05:44:24 +0000 (05:44 +0000)]
For real this time: PHI Def & Kill tracking added to PHIElimination.

llvm-svn: 76865

15 years agomerge vector-casts-0.ll into vector-casts.ll
Chris Lattner [Thu, 23 Jul 2009 05:33:39 +0000 (05:33 +0000)]
merge vector-casts-0.ll into vector-casts.ll

llvm-svn: 76864

15 years agoMake some existing optimizations that would only trigger on scalars
Chris Lattner [Thu, 23 Jul 2009 05:32:17 +0000 (05:32 +0000)]
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

15 years agoShield clang from LLVM API changes, until the dust settles.
Daniel Dunbar [Thu, 23 Jul 2009 05:30:36 +0000 (05:30 +0000)]
Shield clang from LLVM API changes, until the dust settles.

llvm-svn: 76862

15 years agoconvert a test to filecheck format. This fixes an endemic problem
Chris Lattner [Thu, 23 Jul 2009 05:27:48 +0000 (05:27 +0000)]
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

15 years agorename test
Chris Lattner [Thu, 23 Jul 2009 05:25:12 +0000 (05:25 +0000)]
rename test

llvm-svn: 76860

15 years agorefactor a bunch of code out into a helper function,
Chris Lattner [Thu, 23 Jul 2009 05:14:02 +0000 (05:14 +0000)]
refactor a bunch of code out into a helper function,
no functionality change.

llvm-svn: 76859

15 years agoFix test case, which has a control-reaches-end-of-non-void warning that was
Daniel Dunbar [Thu, 23 Jul 2009 05:06:51 +0000 (05:06 +0000)]
Fix test case, which has a control-reaches-end-of-non-void warning that was
being masked by previous bug.

llvm-svn: 76858

15 years agoUse llvm::BitVector instead of managing memory by hand.
Daniel Dunbar [Thu, 23 Jul 2009 05:01:54 +0000 (05:01 +0000)]
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

15 years agoSet field info for unions.
Anders Carlsson [Thu, 23 Jul 2009 04:59:05 +0000 (04:59 +0000)]
Set field info for unions.

llvm-svn: 76856

15 years agoremove a really old and dead header
Chris Lattner [Thu, 23 Jul 2009 04:59:02 +0000 (04:59 +0000)]
remove a really old and dead header

llvm-svn: 76855

15 years agoUse arrays as union padding. Also, since the resulting struct will always contain...
Anders Carlsson [Thu, 23 Jul 2009 04:50:01 +0000 (04:50 +0000)]
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

15 years agomerge one more sse41 test into sse41.ll
Chris Lattner [Thu, 23 Jul 2009 04:49:39 +0000 (04:49 +0000)]
merge one more sse41 test into sse41.ll

llvm-svn: 76853

15 years agomerge another sse41 test into sse41.ll
Chris Lattner [Thu, 23 Jul 2009 04:43:48 +0000 (04:43 +0000)]
merge another sse41 test into sse41.ll

llvm-svn: 76852

15 years agoRevert r76831, there are many Analyzer test failures on multiple platforms.
Daniel Dunbar [Thu, 23 Jul 2009 04:41:06 +0000 (04:41 +0000)]
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