Commit Graph

146189 Commits

Author SHA1 Message Date
Richard Smith b2bfad2355 Remove FIXMEs: these are covered by a core issue which we don't yet implement
(but we happen to get this part right).

llvm-svn: 177958
2013-03-26 01:17:18 +00:00
Richard Smith 7447af48b1 Implement special-case name lookup for inheriting constructors: member
using-declarations with names which look constructor-like are interpreted as
constructor names.

llvm-svn: 177957
2013-03-26 01:15:19 +00:00
Bill Wendling 1ee6d8cef4 Remove testcase. It's failing on some platforms but not others.
llvm-svn: 177956
2013-03-26 01:10:03 +00:00
Bill Wendling d78cfa81be Hmm...not failing...odd
llvm-svn: 177955
2013-03-26 01:08:02 +00:00
Richard Smith 74bb2d2285 Remove some no-op static_casts.
llvm-svn: 177954
2013-03-26 00:54:11 +00:00
Bill Wendling a5a44d4fd6 Temporarily XFAIL this test until Michael can look at it.
llvm-svn: 177953
2013-03-26 00:46:31 +00:00
Michael Gottesman cd4de0f9bb [ObjCARC Annotations] Added support for displaying the state of pointers at the bottom/top of BBs of the ARC dataflow analysis for both bottomup and topdown analyses.
This will allow for verification and analysis of the merge function of
the data flow analyses in the ARC optimizer.

The actual implementation of this feature is by introducing calls to
the functions llvm.arc.annotation.{bottomup,topdown}.{bbstart,bbend}
which are only declared. Each such call takes in a pointer to a global
with the same name as the pointer whose provenance is being tracked and
a pointer whose name is one of our Sequence states and points to a
string that contains the same name.

To ensure that the optimizer does not consider these annotations in any
way, I made it so that the annotations are considered to be of IC_None
type.

A test case is included for this commit and the previous
ObjCARCAnnotation commit.

llvm-svn: 177952
2013-03-26 00:42:09 +00:00
Michael Gottesman 81b1d43783 [ObjCARC Annotations] Implemented ARC annotation metadata to expose the ARC data flow analysis state in the IR via metadata.
Previously the inner works of the data flow analysis in ObjCARCOpts was hard to
get out of the optimizer for analysis of bugs or testing. All of the current ARC
unit tests are based off of testing the effect of the data flow
analysis (i.e. what statements are removed or moved, etc.). This creates
weakness in the current unit testing regimem since we are not actually testing
what effects various instructions have on the modeled pointer state.
Additionally in order to analyze a bug in the optimizer, one would need to track
by hand what the optimizer was actually doing either through use of DEBUG
statements or through the usage of a debugger, both yielding large loses in
developer productivity.

This patch deals with these two issues by providing ARC annotation
metadata that annotates instructions with the state changes that they cause in
various pointers as well as provides metadata to annotate provenance sources.

Specifically, we introduce the following metadata types:

1. llvm.arc.annotation.bottomup.
2. llvm.arc.annotation.topdown.
3. llvm.arc.annotation.provenancesource.

llvm.arc.annotation.{bottomup,topdown}: These annotations describes a state
change in a pointer when we are visiting instructions bottomup/topdown
respectively. The output format for both is the same:

  !1 = metadata !{metadata !"(test,%x)", metadata !"S_Release", metadata !"S_Use"}

The first element is a string tuple with the following format:

  (function,variable name)

The second two elements of the metadata show the previous state of the
pointer (in this case S_Release) and the new state of the pointer (S_Use). We
write the metadata in such a manner to ensure that it is easy for outside tools
to parse. This is important since I am currently working on a tool for taking
this information and pretty printing it besides the IR and that can be used for
LIT style testing via the generation of an index.

llvm.arc.annotation.provenancesource: This metadata is used to annotate
instructions which act as provenance sources, i.e. ones that introduce a
new (from the optimizer's perspective) non-argument pointer to track. This
enables cross-referencing in between provenance sources and the state changes
that occur to them.

This is still a work in progress. Additionally I plan on committing
later today additions to the annotations that annotate at the top/bottom
of basic blocks the state of the various pointers being tracked.

*NOTE* The metadata support is conditionally compiled into libObjCARCOpts only
when we are producing a debug build of llvm/clang and even so are
disabled by default. To enable the annotation metadata, pass in
-enable-objc-arc-annotations to opt.

llvm-svn: 177951
2013-03-26 00:42:04 +00:00
Michael Gottesman 88d1883de7 Added documentation to LangRef for the intrinsic llvm.ptr.annotation.* which for some reason was never written.
llvm-svn: 177950
2013-03-26 00:34:27 +00:00
Enrico Granata c540f57ffc Checking that the wrong syntax does not give a correct summary after clearing the error messages here
llvm-svn: 177949
2013-03-26 00:24:27 +00:00
Fariborz Jahanian 36b1e5ce82 Objective-C: Property declaration overiding one in
its super class or protocols inherit their 
availability/deprecated attribute. // rdar://13467644

llvm-svn: 177948
2013-03-25 23:59:42 +00:00
Michael Liao 5fbcd81793 Revise alignment checking/calculation on 256-bit unaligned memory access
- It's still considered aligned when the specified alignment is larger
  than the natural alignment;
- The new alignment for the high 128-bit vector should be min(16,
  alignment) as the pointer is advanced by 16, a power-of-2 offset.

llvm-svn: 177947
2013-03-25 23:50:10 +00:00
NAKAMURA Takumi f759061908 clang/test/Index/crash-recovery-code-complete.c: Mark it as XFAIL:win32 for now.
I know MemoryBuffer might affect this. Still investigating.

llvm-svn: 177946
2013-03-25 23:49:11 +00:00
Michael Liao bb05a1d7b5 Enhance folding of (extract_subvec (insert_subvec V1, V2, IIdx), EIdx)
- Handle the case where the result of 'insert_subvect' is bitcasted
  before 'extract_subvec'. This removes the redundant insertf128/extractf128
  pair on unaligned 256-bit vector load/store on vectors of non 64-bit integer.

llvm-svn: 177945
2013-03-25 23:47:35 +00:00
Douglas Gregor a3890528d6 <rdar://problem/13395022> Strip references when extracting an initializer_list's element type during application of an initialization sequence.
llvm-svn: 177944
2013-03-25 23:47:01 +00:00
Jakob Stoklund Olesen 52576719e0 Add an -mcpu option to a test that is apparently scheduler-sensitive.
This should fix the clang-atom-d2700-ubuntu-rel buildbot.

llvm-svn: 177943
2013-03-25 23:43:23 +00:00
Jakob Stoklund Olesen 8dfe9006c6 Add a scheduling model for Intel Sandy Bridge microarchitecture.
The model isn't hooked up by this patch because the instruction set
isn't fully annotated yet.

llvm-svn: 177942
2013-03-25 23:37:17 +00:00
Douglas Gregor ea306a14f4 <rdar://problem/13185264> Don't crash when attempting to redundantly initialize a member of an anonymous union.
llvm-svn: 177941
2013-03-25 23:28:23 +00:00
Matt Beaumont-Gay 677ce95a08 Fix layering violation harder.
llvm-svn: 177940
2013-03-25 23:19:32 +00:00
Douglas Gregor c060b4cfa2 <rdar://problem/13358795> Teach CMake to check Subversion version information at build time, not configure time.
llvm-svn: 177939
2013-03-25 23:16:38 +00:00
Douglas Gregor 96fa0fcff1 Introduce a tiny CMake project to gather Subversion revision information and place it into a header.
llvm-svn: 177938
2013-03-25 23:14:19 +00:00
Jakob Stoklund Olesen 4d39e81fb8 Remove IIC_DEFAULT from X86Schedule.td
All the instructions tagged with IIC_DEFAULT had nothing in common, and
we already have a NoItineraries class to represent untagged
instructions.

llvm-svn: 177937
2013-03-25 23:12:41 +00:00
Jakob Stoklund Olesen 5889ad6cd6 Annotate X86InstrCompiler.td with SchedRW lists.
llvm-svn: 177936
2013-03-25 23:07:35 +00:00
Jakob Stoklund Olesen 7fde8c4ef4 Annotate shifts and rotates with SchedRW lists.
llvm-svn: 177935
2013-03-25 23:07:32 +00:00
Ted Kremenek 30b77bf737 Fix testcase.
llvm-svn: 177934
2013-03-25 23:05:40 +00:00
Shuxin Yang 93b1f12ac1 Disable some unsafe-fp-math DAG-combine transformation after legalization.
For instance, following transformation will be disabled:
    x + x + x => 3.0f * x;

The problem of these transformations is that it introduces a FP constant, which
following Instruction-Selection pass cannot handle.

Reviewed by Nadav, thanks a lot!

rdar://13445387

llvm-svn: 177933
2013-03-25 22:52:29 +00:00
Greg Clayton 4d8ad55c78 Modified patch from Prabhat Verma to enable loading core files through the SBTarget API.
llvm-svn: 177932
2013-03-25 22:40:51 +00:00
Ted Kremenek cd3d440b82 For printf checking, handle nested typedefs for darwin-specific checking.
Fixes <rdar://problem/13491605>.

llvm-svn: 177931
2013-03-25 22:28:37 +00:00
Douglas Gregor 780420ea4e <rdar://problem/13459871> Allow forward declaration of enums with a fixed underlying type in Objective-C (as well as C++11).
llvm-svn: 177930
2013-03-25 22:22:35 +00:00
Howard Hinnant ea1bbbd135 Added debug tests for indexing, pop_back and both forms of erase. Added an improved error message for erasing a single element with end().
llvm-svn: 177929
2013-03-25 22:12:26 +00:00
John McCall a237239097 Add an optimizer-side test case for ARC bug <rdar://13195034>, fixed
in the frontend with @clang.arc.use.

llvm-svn: 177928
2013-03-25 22:09:52 +00:00
Timur Iskhodzhanov 2dee3dd61c Add a GetTid() implementation for Windows
llvm-svn: 177927
2013-03-25 22:04:29 +00:00
Greg Clayton fe736e889e Fix the buildbot so a LLDB test doesn't fail looking for "<invalid usage of pointer value as object>".
llvm-svn: 177926
2013-03-25 22:04:11 +00:00
Douglas Gregor 5168e70c0c Remove local path from test.
llvm-svn: 177925
2013-03-25 21:52:42 +00:00
Douglas Gregor 37da327c6a Use <time.h> rather than <sys/time.h>
llvm-svn: 177924
2013-03-25 21:51:16 +00:00
Douglas Gregor b0c9201eb9 Use xargs rather than
llvm-svn: 177923
2013-03-25 21:49:54 +00:00
Matt Beaumont-Gay 07544fa55f Fix a layering violation introduced in r177705.
llvm-svn: 177922
2013-03-25 21:32:02 +00:00
Douglas Gregor 1f37dddd57 Use 'touch -t', which both BSD and Linux support.
llvm-svn: 177921
2013-03-25 21:27:57 +00:00
Eric Christopher 3820184a8d Couple more sets of tidying.
llvm-svn: 177920
2013-03-25 21:26:36 +00:00
Nick Lewycky 966b19951f Try harder to be signal-safe inside our signal handler. The most prominent behavioural
difference is that we no longer clean the token before emitting it. This fixes a bug where
clang hangs in the middle of crashing because the crash handler calls malloc from inside
a crash that happened inside of free.

llvm-svn: 177919
2013-03-25 21:24:30 +00:00
Douglas Gregor 527b1c95df <rdar://problem/13434605> Periodically prune the module cache so that it does not grow forever.
llvm-svn: 177918
2013-03-25 21:19:16 +00:00
Jyotsna Verma 5bd02926b4 Disable profiling tests for Hexagon since it doesn't support JIT.
llvm-svn: 177917
2013-03-25 21:15:11 +00:00
Nick Lewycky 1d9a5d27ba Correct indentation. No functionality change.
llvm-svn: 177916
2013-03-25 21:10:14 +00:00
Bill Wendling c4fc3a2ba5 Emit an error message instead of crashing when dereferencing an incomplete pointer type.
If the ASM statement is dereferencing an incomplete pointer type, issue an error
instead of crashing.
<rdar://problem/12700799>

llvm-svn: 177915
2013-03-25 21:09:49 +00:00
NAKAMURA Takumi 8c0d63c120 llvm/test/CodeGen/X86/atomic{32|64}.ll: Unmark them out of XFAIL:win32.
I know it is incorrect and they'd fail with +Asserts for win32 targets, though.
I'll try to fix them tonight.

llvm-svn: 177914
2013-03-25 21:07:53 +00:00
Greg Clayton 5088c48686 <rdar://problem/13498879>
C String summary is emitting "<invalid usage of pointer value as object>" for bad pointers. Now it doesn't emit anything.

llvm-svn: 177913
2013-03-25 21:06:13 +00:00
Jyotsna Verma 18ca8101ee XFAIL some of the generic CodeGen tests for Hexagon.
test/CodeGen/Generic/2008-02-20-MatchingMem.ll: Test contains inline assembly not supported by Hexagon.

Following tests are XFAILed due to multiple return values which Hexagon doesn't support.

test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
test/CodeGen/Generic/select-cc.ll
test/CodeGen/Generic/vector.ll

llvm-svn: 177912
2013-03-25 21:04:16 +00:00
Chad Rosier 651c1839ee IR-gen should not generate an MMX types unless the code is explicitly using MMX
intrinsics.
rdar://13213542

llvm-svn: 177911
2013-03-25 21:00:27 +00:00
NAKAMURA Takumi f87f70a72d X86DisassemblerDecoder.c: Make this C89-compliant.
llvm-svn: 177910
2013-03-25 20:55:49 +00:00
NAKAMURA Takumi dde7fa838e Whitespace.
llvm-svn: 177909
2013-03-25 20:55:43 +00:00