Commit Graph

109340 Commits

Author SHA1 Message Date
Chris Lattner 43cae02689 rename test.
llvm-svn: 135751
2011-07-22 06:26:12 +00:00
Douglas Gregor d32f035267 Introduce a global bit-offset continuous range map into the ASTReader,
so that we have one, simple way to map from global bit offsets to
local bit offsets. Eliminates a number of loops over the chain, and
generalizes for more interesting bit remappings.

Also, as an amusing oddity, we were computing global bit offsets
*backwards* for preprocessed entities (e.g., the directly included PCH
file in the chain would start at offset zero, rather than the original
PCH that occurs first in translation unit). Even more amusingly, it
made precompiled preambles work, because we were forgetting to adjust
the local bit offset to a global bit offset when storing preprocessed
entity offsets in the ASTUnit. Two wrongs made a right, and now
they're both right.

llvm-svn: 135750
2011-07-22 06:10:01 +00:00
Douglas Gregor 77d993d3aa Fix an embarrassing bug in relocatable PCH support, where we were
passing a temporary const char* down as the "isysroot" parameter and
then accessing it later. Fixes <rdar://problem/9035180>.

llvm-svn: 135749
2011-07-22 06:03:18 +00:00
Chandler Carruth 4dd6c043ae Move duplicate uninitialized warning suppression into the
AnalysisBasedWarnings Sema layer and out of the Analysis library itself.
This returns the uninitialized values analysis to a more pure form,
allowing its original logic to correctly detect some categories of
definitely uninitialized values. Fixes PR10358 (again).

Thanks to Ted for reviewing and updating this patch after his rewrite of
several portions of this analysis.

llvm-svn: 135748
2011-07-22 05:27:52 +00:00
John McCall 24fada127f In ARC, non-atomic getters do not need to retain and autorelease
their loaded values, although it still worth doing this for __weak
properties to get the autoreleased-return-value optimization.

llvm-svn: 135747
2011-07-22 05:23:13 +00:00
John McCall 0410e572b9 Move this ObjCImplementationDecl member function into libAST
where it belongs.

llvm-svn: 135746
2011-07-22 04:15:06 +00:00
NAKAMURA Takumi af8d50ddb3 lib/Support/Triple.cpp: Recognize "-march=ppc32" to llc properly, as quick hack.
FIXME: There is an inconsistency. llvm::Triple does not understand "ppc32" and PowerPC/TargetInfo holds "ppc32".
llvm-svn: 135745
2011-07-22 04:02:22 +00:00
Eli Friedman f12e4e914b Some LangRef tweaks, per Dan's comments.
llvm-svn: 135744
2011-07-22 03:04:45 +00:00
John McCall d2930c2100 In Objective-C, pull arbitrary attributes from overridden
methods, including indirectly overridden methods like those
declared in protocols and categories.  There are mismatches
that we would like to diagnose but aren't yet, but this   
is fine for now.

I looked at approaches that avoided doing this lookup 
unless we needed it, but the infer-related-result-type
checks were doing it anyway, so I left it with the same
fast-path check for no previous declartions of that 
selector.

llvm-svn: 135743
2011-07-22 02:45:48 +00:00
Jakub Staszak b82bbf40bb Allow getBlockFreq to return 0.
llvm-svn: 135742
2011-07-22 02:24:57 +00:00
Jordy Rose a91768e569 Add a const overload for ObjCInterfaceDecl::all_declared_ivar_begin.
This was previously not-const only because it has to lazily construct a chain
of ivars the first time it is called (and after the chain is invalidated).
In practice, all the clients were just const_casting their const Decls;
all those now-unnecessary const_casts have been removed.

llvm-svn: 135741
2011-07-22 02:08:32 +00:00
Fariborz Jahanian dff8de77a6 objective-c: Any use of @synthesize or @dynamic lexically after a method (or C function) implementation
will be rejected with a compilation error in ARC mode, and a compiler warning otherwise.
This may cause breakage in non-arc (and arc) tests which don't expect warning/error. Feel free
to fix the tests, or reverse the patch, if I am unavailable. // rdar://9818354 - WIP

llvm-svn: 135740
2011-07-22 01:06:53 +00:00
Benjamin Kramer 959b7e9df7 GCC complains about the angle of this line.
Remove the escaped newline.

llvm-svn: 135739
2011-07-22 01:02:57 +00:00
Jakub Staszak 7987ea7460 Revert patch which broke some IfConversion tests.
llvm-svn: 135738
2011-07-22 00:55:15 +00:00
Johnny Chen efee1cdc2b Fix comment.
llvm-svn: 135737
2011-07-22 00:51:54 +00:00
Johnny Chen 989b7efd8a Add BasicFormatter and ChildVisitingFormatter utility classes to the lldbutil.py module
which provide some convenient ways to print an SBValue object.  Use that in TestValueAPI.py
to print the 'days_of_week' char* array variable.

For an example:

cvf = lldbutil.ChildVisitingFormatter(indent=2)
print cvf.format(days_of_week)

produces:

(const char *[7]) days_of_week = 0x00000001026a5060 (location)
  (const char *) [0] = "Sunday"
  (const char *) [1] = "Monday"
  (const char *) [2] = "Tuesday"
  (const char *) [3] = "Wednesday"
  (const char *) [4] = "Thursday"
  (const char *) [5] = "Friday"
  (const char *) [6] = "Saturday"

llvm-svn: 135736
2011-07-22 00:47:58 +00:00
Benjamin Kramer 1eb27ae580 Teach tblgen to emit MCRegisterClasses.
- This currently introduces more instances of the static DenseSet dtor, but that should be fixable.

llvm-svn: 135735
2011-07-22 00:44:39 +00:00
Jakub Staszak 76d711582c Fix typo in #include which revealed in the case-sensitive filesystem.
llvm-svn: 135734
2011-07-22 00:39:00 +00:00
Douglas Gregor 903b7e9b65 In the AST reader, factor out the mapping of local type IDs to global
type IDs into a single place, and make sure that all of the callers
use the appropriate functions to do the mapping. Since the mapping is
still the identity function, this is essentially a no-op.

llvm-svn: 135733
2011-07-22 00:38:23 +00:00
Enrico Granata d55546b27a when typing a summary string you can use the %S symbol to explicitly indicate that you want the summary to be used to print the target object
(e.g. ${var%S}). this might already be the default if your variable is of an aggregate type
new feature: synthetic filters. you can restrict the number of children for your variables to only a meaningful subset
 - the restricted list of children obeys the typical rules (e.g. summaries prevail over children)
 - one-line summaries show only the filtered (synthetic) children, if you type an expanded summary string, or you use Python scripts, all the real children are accessible
 - to provide a synthetic children list use the "type synth add" command, as in:
   type synth add foo_type --child varA --child varB[0] --child varC->packet->flags[1-4]
   (you can use ., ->, single-item array operator [N] and bitfield operator [N-M]; array slice access is not supported, giving simplified names to expression paths is not supported)
 - a new -S option to frame variable and target variable lets you override synthetic children and instead show real ones

llvm-svn: 135731
2011-07-22 00:16:08 +00:00
Bruno Cardoso Lopes 1872173841 Remove the 128-bit special handling from SCALAR_TO_VECTOR. This isn't
the way to go. Doing this here will prevent several node matches later,
and would have to force looking all the way through several
VINSERTF128/VEXTRACTF128 chains to optimize simple things.

llvm-svn: 135730
2011-07-22 00:15:10 +00:00
Bruno Cardoso Lopes 612e56174b -Inspected a AVX code block added by someone in early Feb. This was never used
and was actually very wrong, fix it and make it simpler. Also remove the
ConcatVectors function, which is unused now.

- Fix a introduction of useless nodes in r126664 and r126264. The
VUNPCKL* should never be introduced cause we don't want duplicate
nodes for 128 AVX and non-AVX modes, the actual instruction
difference only exists during isel, but not for target specific DAG
nodes. We only introduce V* target nodes when there is no 128-bit
version already there.

- Fix a fragile test and make it more useful.

llvm-svn: 135729
2011-07-22 00:15:07 +00:00
Bruno Cardoso Lopes 14a95bda04 Although we already support this, add testcases for consistency
llvm-svn: 135728
2011-07-22 00:15:03 +00:00
Bruno Cardoso Lopes 91eff5140f Add a DAGCombine for transforming 128->256 casts into a simple
vxorps + vinsertf128 pair of instructions

llvm-svn: 135727
2011-07-22 00:15:00 +00:00
Bruno Cardoso Lopes dbebd01269 Introduce a new function to lower 256-bit vectors which are not
direclty supported and should be promoted and handled by smaller
shuffles

llvm-svn: 135726
2011-07-22 00:14:56 +00:00
Bruno Cardoso Lopes 95d037721b Rename function to be more specific and be more strict about its usage
llvm-svn: 135725
2011-07-22 00:14:53 +00:00
Jakub Staszak 44860314d2 Use MachineBranchProbabilityInfo instead of MachineLoopInfo in IfConversion.
llvm-svn: 135724
2011-07-21 23:48:55 +00:00
Rafael Espindola a7431924ab Avoid warning on "clang -c -Dfoo test.i". Lines like these are created
when using ccache and libtool.m4 assumes that the compiler cannot print
warnings about options it knows about.

llvm-svn: 135723
2011-07-21 23:40:37 +00:00
Owen Anderson 0491270f99 Get rid of the extraneous GPR operand on so_reg_imm operands, which in turn necessitates a lot of changes to related bits.
llvm-svn: 135722
2011-07-21 23:38:37 +00:00
Dan Gohman e106aee6f5 Fix MergeInVectorType to check for vector types with the same alloc
size but different element types, so that it filters out the cases
that CreateShuffleVectorCast doesn't handle. This fixes rdar://9786827.

llvm-svn: 135721
2011-07-21 23:30:09 +00:00
Douglas Gregor f224ae06d2 Clean up the rest of the local -> global declaration ID mappings
within the ASTReader (I hope).

llvm-svn: 135720
2011-07-21 23:29:11 +00:00
Jim Grosbach 72e7c4f9ac ARM Asm parser range checking for [0,31] immediates.
llvm-svn: 135719
2011-07-21 23:26:25 +00:00
Jim Grosbach 3354674b48 ARM parsing and encoding tests for SBC instruction.
llvm-svn: 135718
2011-07-21 23:03:59 +00:00
Benjamin Kramer 737a3dac02 Initialize DenseSets lazily.
llvm-svn: 135717
2011-07-21 23:03:59 +00:00
Johnny Chen 6cbb8d684f Add test scenario of SBValue APIs for the 'days_of_week' global variable.
llvm-svn: 135716
2011-07-21 23:02:00 +00:00
Jim Grosbach 8dbf59d041 ARM testcases for SADD/SASX parsing and encoding.
llvm-svn: 135715
2011-07-21 23:00:49 +00:00
Jakub Staszak cb7c0a4927 Add missing getAnalysisUsage in MachineBlockFrequency.
llvm-svn: 135714
2011-07-21 22:59:09 +00:00
Jim Grosbach 2a0320c877 ARM assembly parsing support for RSC instruction.
Add two-operand instruction aliases. Add parsing and encoding tests for
variants of the instruction.

llvm-svn: 135713
2011-07-21 22:56:30 +00:00
Jim Grosbach 17806e6636 ARM assembly parsing support for RSB instruction.
Add two-operand instruction aliases. Add parsing and encoding tests for
variants of the instruction.

llvm-svn: 135712
2011-07-21 22:37:43 +00:00
Douglas Gregor 7fb091977d In the ASTReader, factor out the loading of (local) declaration IDs,
such that every declaration ID loaded from an AST file will go through
a central local -> global mapping function. At present, this change
does nothing, since the local -> global mapping function is the
identity function.

This is the mechanical part of the refactoring; a follow-up patch will
address a few remaining areas where it's not obvious whether we're
dealing with local or global IDs.

llvm-svn: 135711
2011-07-21 22:35:25 +00:00
Jim Grosbach 2a22c06267 ARM parsing and encoding tests for RBIT, REV, REV16 and REVSH.
llvm-svn: 135710
2011-07-21 22:29:23 +00:00
Jim Grosbach b31e60b7c6 ARM parsing and encodings tests for saturating arithmetic insns.
llvm-svn: 135709
2011-07-21 22:18:28 +00:00
Alexis Hunt 82bb089e87 Add a missing test for the limits on wchar
llvm-svn: 135708
2011-07-21 22:01:12 +00:00
Argyrios Kyrtzidis 4145732818 Fix diagnostic when loading a PCH which has different enabled/disabled state of -fobjc-arc. rdar://9818341
llvm-svn: 135707
2011-07-21 21:56:04 +00:00
Jim Grosbach 4aaae18d73 Tidy up.
llvm-svn: 135706
2011-07-21 21:26:05 +00:00
Jonathan D. Turner 3766fdb654 Cleaning up more of the ID situation in the AST reader. This patch relaxes and generalizes how CXX base specifiers are identified and loaded by using a ContinuousRangeMap. This also adds a global bit offset (or base) to the PerFileData.
llvm-svn: 135705
2011-07-21 21:15:19 +00:00
Nicolas Geoffray 6820c1e0d3 Update generated CPP code with the new API on CallInst::Create and ConstantExpr::getGetElementPtr.
llvm-svn: 135704
2011-07-21 20:59:21 +00:00
Jim Grosbach 0a8d89242f ARM assembly parsing POP/PUSH mnemonics.
Aliases for LDM/STM. The single-register versions should encode to LDR/STR
with writeback, but we don't (yet) get that correct. Neither does Darwin's
system assembler, though, so that's not a deal-breaker of a limitation.

llvm-svn: 135702
2011-07-21 19:57:11 +00:00
Douglas Gregor 204b8717d4 Add some debugging output to the AST reader, so we can see the global remappings we generate
llvm-svn: 135701
2011-07-21 19:50:14 +00:00
Johnny Chen 6853cf66d1 Add test scenario for exercising SBValue API: TypeIsPointerType() and GetByteSize().
llvm-svn: 135699
2011-07-21 19:31:59 +00:00