John McCall [Fri, 31 Jul 2009 02:45:11 +0000 (02:45 +0000)]
Rename Action::TagKind to Action::TagUseKind, which removes both a misnomer
and a name collision.
llvm-svn: 77658
Daniel Dunbar [Fri, 31 Jul 2009 02:32:59 +0000 (02:32 +0000)]
llvm-mc: Match a few X86 instructions.
- This is "experimental" code, I am feeling my way around and working out the
best way to do things (and learning tblgen in the process). Comments welcome,
but keep in mind this stuff will change radically.
- This is enough to match "subb" and friends, but not much else. The next step is to
automatically generate the matchers for individual operands.
llvm-svn: 77657
John McCall [Fri, 31 Jul 2009 02:20:35 +0000 (02:20 +0000)]
sp.
llvm-svn: 77656
Mike Stump [Fri, 31 Jul 2009 02:02:20 +0000 (02:02 +0000)]
Whitespace around else canonicalization and fix 80-col violations.
llvm-svn: 77655
Dan Gohman [Fri, 31 Jul 2009 01:52:50 +0000 (01:52 +0000)]
Manage MachineFunctions with an analysis Pass instead of the Annotable
mechanism. To support this, make MachineFunctionPass a little more
complete.
llvm-svn: 77654
Eli Friedman [Fri, 31 Jul 2009 01:43:05 +0000 (01:43 +0000)]
Make the check for the linkage of a template handle the case of nested
linkage specifications correctly.
llvm-svn: 77653
Anders Carlsson [Fri, 31 Jul 2009 01:23:52 +0000 (01:23 +0000)]
Add CK_DerivedToBase and use it PerformObjectMemberConversion.
llvm-svn: 77652
Mike Stump [Fri, 31 Jul 2009 01:10:29 +0000 (01:10 +0000)]
Fix build warnings.
llvm-svn: 77651
Anders Carlsson [Fri, 31 Jul 2009 00:48:10 +0000 (00:48 +0000)]
Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :)
llvm-svn: 77650
Benjamin Kramer [Fri, 31 Jul 2009 00:35:23 +0000 (00:35 +0000)]
Fix cmake build.
llvm-svn: 77649
Ted Kremenek [Fri, 31 Jul 2009 00:34:52 +0000 (00:34 +0000)]
Fix use-after-release bug introduced in r77585 where the PathDiagnosticClient
created by AnalysisConsumer would be released by an instance of AnalysisManager
and then reused by later instances of AnalysisManager. Ownership of the
PathDiagnosticClient now belongs (for now) in AnalysisConsumer.
We also need this layering (for now) because the HTMLDiagnostiClient requires
that the entire translation unit be processed before emitting diagnostics. This
is done in its destructor (which should also be fixed, but that is another
issue).
This fixes PR 4653.
llvm-svn: 77648
Douglas Gregor [Fri, 31 Jul 2009 00:23:35 +0000 (00:23 +0000)]
Build canonical types for dependently-sized array types.
llvm-svn: 77647
Devang Patel [Thu, 30 Jul 2009 23:59:04 +0000 (23:59 +0000)]
Add getOrInsertNamedMetadata().
llvm-svn: 77646
Devang Patel [Thu, 30 Jul 2009 23:57:23 +0000 (23:57 +0000)]
Add addElement().
llvm-svn: 77645
Ted Kremenek [Thu, 30 Jul 2009 23:55:19 +0000 (23:55 +0000)]
Add scan-build option '-no-failure-reports' to supress the creation of a 'failures' subdirectory that includes crash reports, preprocessed files, etc.
llvm-svn: 77644
Douglas Gregor [Thu, 30 Jul 2009 23:36:40 +0000 (23:36 +0000)]
Canonicalization of dependent C++0x decltype types.
llvm-svn: 77643
Evan Cheng [Thu, 30 Jul 2009 23:29:25 +0000 (23:29 +0000)]
When fp is not eliminated, instructions with T2_i12 modes will be changed to T2_i8 ones. Take that into consideration when determining stack size limit for reserving register scavenging slot.
llvm-svn: 77642
Fariborz Jahanian [Thu, 30 Jul 2009 23:22:00 +0000 (23:22 +0000)]
Synthesize the default constructor which has not
been declared as needed.
llvm-svn: 77641
Lang Hames [Thu, 30 Jul 2009 23:18:43 +0000 (23:18 +0000)]
Removed the BigBlock register allocator.
llvm-svn: 77640
Douglas Gregor [Thu, 30 Jul 2009 23:18:24 +0000 (23:18 +0000)]
Canonicalization for dependent typeof(expr) types.
llvm-svn: 77639
Owen Anderson [Thu, 30 Jul 2009 23:11:26 +0000 (23:11 +0000)]
Update for LLVM API changes.
llvm-svn: 77638
Devang Patel [Thu, 30 Jul 2009 23:06:35 +0000 (23:06 +0000)]
Do not use abbrev while writing NamedMDNode name.
llvm-svn: 77637
Devang Patel [Thu, 30 Jul 2009 23:03:43 +0000 (23:03 +0000)]
Enumerate NamedMDNode elements first.
llvm-svn: 77636
Owen Anderson [Thu, 30 Jul 2009 23:03:37 +0000 (23:03 +0000)]
Move more code back to 2.5 APIs.
llvm-svn: 77635
Devang Patel [Thu, 30 Jul 2009 23:03:19 +0000 (23:03 +0000)]
Handle NamedMDNode.
llvm-svn: 77633
David Goodwin [Thu, 30 Jul 2009 22:45:52 +0000 (22:45 +0000)]
Remove redundant match for frame index from imm8 addrmode, it is handled by the imm12 addrmode.
llvm-svn: 77632
Anders Carlsson [Thu, 30 Jul 2009 22:39:03 +0000 (22:39 +0000)]
Diagnose unused expression results for all statements, just not compound statements.
llvm-svn: 77631
Anders Carlsson [Thu, 30 Jul 2009 22:37:41 +0000 (22:37 +0000)]
Add casts to avoid a bunch of unused expr warnings. (They aren't reported right now due to a bug that I intend to fix). Ted, please review.
llvm-svn: 77630
Mike Stump [Thu, 30 Jul 2009 22:28:39 +0000 (22:28 +0000)]
Canonicalize else spacing.
llvm-svn: 77629
Anders Carlsson [Thu, 30 Jul 2009 22:17:18 +0000 (22:17 +0000)]
Factor code out into a DiagnoseUnusedExprResult function.
llvm-svn: 77628
David Goodwin [Thu, 30 Jul 2009 21:51:41 +0000 (21:51 +0000)]
Darwin assembler now recognizes "orn", so remove workaround.
llvm-svn: 77627
Mike Stump [Thu, 30 Jul 2009 21:47:44 +0000 (21:47 +0000)]
Note some other limitations.
llvm-svn: 77626
David Goodwin [Thu, 30 Jul 2009 21:38:40 +0000 (21:38 +0000)]
Darwin assembler now supports "rrx", so remove workaround.
llvm-svn: 77625
Daniel Dunbar [Thu, 30 Jul 2009 21:15:14 +0000 (21:15 +0000)]
Twine: Directly support int, long, and long long types.
- This should resolve Cygwin gcc ambiguities.
llvm-svn: 77624
Dan Gohman [Thu, 30 Jul 2009 20:21:41 +0000 (20:21 +0000)]
Use CallbackVH in AliasSetTracker to avoid getting stuck with
dangling Value*s.
llvm-svn: 77623
David Goodwin [Thu, 30 Jul 2009 18:56:48 +0000 (18:56 +0000)]
Cleanup and include code selection for some frame index cases.
llvm-svn: 77622
Devang Patel [Thu, 30 Jul 2009 18:56:46 +0000 (18:56 +0000)]
Start using DebugInfoFinder.
llvm-svn: 77621
Devang Patel [Thu, 30 Jul 2009 18:46:29 +0000 (18:46 +0000)]
Do not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a GlobalValue.
Thanks Benjamin Kramer!
llvm-svn: 77619
Devang Patel [Thu, 30 Jul 2009 18:45:09 +0000 (18:45 +0000)]
Fix MetadataBase::classof().
Thanks Benjamin Kramer!
llvm-svn: 77618
Daniel Dunbar [Thu, 30 Jul 2009 18:30:19 +0000 (18:30 +0000)]
Twine: Use raw_ostream::write_hex, remove unused itohexstr method.
llvm-svn: 77617
Daniel Dunbar [Thu, 30 Jul 2009 18:29:44 +0000 (18:29 +0000)]
Remove unintended changes.
llvm-svn: 77616
Devang Patel [Thu, 30 Jul 2009 18:25:15 +0000 (18:25 +0000)]
s/DebugInfoEnumerator/DebugInfoFinder/g
llvm-svn: 77615
Daniel Dunbar [Thu, 30 Jul 2009 18:21:23 +0000 (18:21 +0000)]
Add raw_ostream::write_hex
llvm-svn: 77614
Daniel Dunbar [Thu, 30 Jul 2009 18:18:54 +0000 (18:18 +0000)]
Remove itohexstr, which only had one user.
llvm-svn: 77613
Mike Stump [Thu, 30 Jul 2009 18:01:44 +0000 (18:01 +0000)]
Update based upon comments. Explain why we have an assert.
llvm-svn: 77612
David Goodwin [Thu, 30 Jul 2009 18:01:09 +0000 (18:01 +0000)]
Add missing D* register clobbers for Thumb-2 call.
llvm-svn: 77611
Mike Stump [Thu, 30 Jul 2009 17:53:53 +0000 (17:53 +0000)]
We'll also need a vtable pointer if we have virtual bases.
llvm-svn: 77610
Douglas Gregor [Thu, 30 Jul 2009 17:50:56 +0000 (17:50 +0000)]
What luck! Clang obtains support for refering to members of the
current instantiation when that current instantiation is a class
template partial specialization.
llvm-svn: 77609
Fariborz Jahanian [Thu, 30 Jul 2009 17:49:11 +0000 (17:49 +0000)]
Patch for future ir-gen for destructor calls.
llvm-svn: 77608
Ted Kremenek [Thu, 30 Jul 2009 17:41:23 +0000 (17:41 +0000)]
Lexically order files.
llvm-svn: 77607
Douglas Gregor [Thu, 30 Jul 2009 17:40:51 +0000 (17:40 +0000)]
Support out-of-line definitions of the members of class template
partial specializations.
llvm-svn: 77606
Daniel Dunbar [Thu, 30 Jul 2009 17:37:43 +0000 (17:37 +0000)]
Twines: Don't allow implicit conversion from integers, this is too tricky.
llvm-svn: 77605
Devang Patel [Thu, 30 Jul 2009 17:30:23 +0000 (17:30 +0000)]
walk DbgRegionStartInst and DbgRegionEndInst
llvm-svn: 77604
Devang Patel [Thu, 30 Jul 2009 17:25:33 +0000 (17:25 +0000)]
Fix comment.
llvm-svn: 77603
Dan Gohman [Thu, 30 Jul 2009 17:04:07 +0000 (17:04 +0000)]
Minor whitespace tidiness.
llvm-svn: 77602
Dan Gohman [Thu, 30 Jul 2009 17:02:08 +0000 (17:02 +0000)]
Rename GRAD to GR32_AD, to follow the naming convention of other
classes. And define its SubRegClassList.
llvm-svn: 77601
Douglas Gregor [Thu, 30 Jul 2009 16:10:26 +0000 (16:10 +0000)]
Initialize an otherwise-wild pointer. Fixes a crashy analyzer
llvm-svn: 77599
Chris Lattner [Thu, 30 Jul 2009 16:08:58 +0000 (16:08 +0000)]
add a random codegen deficiency.
llvm-svn: 77598
Benjamin Kramer [Thu, 30 Jul 2009 15:35:55 +0000 (15:35 +0000)]
fix a unitialized pointer in NamedMDNode (and reenable unittest)
llvm-svn: 77597
Benjamin Kramer [Thu, 30 Jul 2009 10:38:43 +0000 (10:38 +0000)]
fix cmake build
llvm-svn: 77589
Zhongxing Xu [Thu, 30 Jul 2009 09:14:54 +0000 (09:14 +0000)]
simple fixes.
llvm-svn: 77587
Sanjiv Gupta [Thu, 30 Jul 2009 09:12:56 +0000 (09:12 +0000)]
Allow targets to define libcall names for mem(cpy,set,move) intrinsics, rather than hardcoding them in DAG lowering.
llvm-svn: 77586
Zhongxing Xu [Thu, 30 Jul 2009 09:11:52 +0000 (09:11 +0000)]
Make AnalysisManager into its own source file and a pure data management class.
Move all components creation code into AnalysisConsumer::DigestAnalyzerOptions().
llvm-svn: 77585
Evan Cheng [Thu, 30 Jul 2009 08:56:19 +0000 (08:56 +0000)]
Add a note.
llvm-svn: 77584
Evan Cheng [Thu, 30 Jul 2009 08:44:08 +0000 (08:44 +0000)]
I've changed the semantics of MERGE_VALUES a bit. It's now allowed to live until scheduling. It's deleted when the scheduler translate DAG nodes to machine instructions.
This is currently used by X86 to handle atomic_load_add when the output of the node is not used. I believe there is a better solution. But I find MERGE_VALUES useful for selecting multi-output node when the dead output can be selected as a IMPLICIT_DEF.
llvm-svn: 77583
Evan Cheng [Thu, 30 Jul 2009 08:33:02 +0000 (08:33 +0000)]
Optimize some common usage patterns of atomic built-ins __sync_add_and_fetch() and __sync_sub_and_fetch.
When the return value is not used (i.e. only care about the value in the memory), x86 does not have to use add to implement these. Instead, it can use add, sub, inc, dec instructions with the "lock" prefix.
This is currently implemented using a bit of instruction selection trick. The issue is the target independent pattern produces one output and a chain and we want to map it into one that just output a chain. The current trick is to select it into a merge_values with the first definition being an implicit_def. The proper solution is to add new ISD opcodes for the no-output variant. DAG combiner can then transform the node before it gets to target node selection.
Problem #2 is we are adding a whole bunch of x86 atomic instructions when in fact these instructions are identical to the non-lock versions. We need a way to add target specific information to target nodes and have this information carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix.
llvm-svn: 77582
Daniel Dunbar [Thu, 30 Jul 2009 04:20:37 +0000 (04:20 +0000)]
Switch obvious clients to Twine instead of utostr (when they were already using
a Twine, e.g., for names).
- I am a little ambivalent about this; we don't want the string conversion of
utostr, but using overload '+' mixed with string and integer arguments is
sketchy. On the other hand, this particular usage is something of an idiom.
llvm-svn: 77579
Sanjiv Gupta [Thu, 30 Jul 2009 04:15:15 +0000 (04:15 +0000)]
Keep track of references to mem(cpy,move,set) and then print only one extern
declaration for them.
llvm-svn: 77578
Daniel Dunbar [Thu, 30 Jul 2009 03:55:04 +0000 (03:55 +0000)]
Update CMakeLists.txt
llvm-svn: 77577
Daniel Dunbar [Thu, 30 Jul 2009 03:47:15 +0000 (03:47 +0000)]
Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
explicitly.
llvm-svn: 77576
Argyrios Kyrtzidis [Thu, 30 Jul 2009 03:42:08 +0000 (03:42 +0000)]
Fix Selector <-> GlobalSelector conversion.
llvm-svn: 77575
Ryan Flynn [Thu, 30 Jul 2009 03:15:39 +0000 (03:15 +0000)]
PR3679 - handle #pragma weak
llvm-svn: 77573
Daniel Dunbar [Thu, 30 Jul 2009 02:43:05 +0000 (02:43 +0000)]
Add -fblocks.
llvm-svn: 77571
Andreas Bolka [Thu, 30 Jul 2009 02:26:01 +0000 (02:26 +0000)]
Equal SCEVs of a subscript give rise to dependence.
llvm-svn: 77570
Daniel Dunbar [Thu, 30 Jul 2009 02:08:27 +0000 (02:08 +0000)]
Disable the NamedMDNodeTest, it is failing everywhere.
llvm-svn: 77569
Nate Begeman [Thu, 30 Jul 2009 02:00:06 +0000 (02:00 +0000)]
Typo
llvm-svn: 77568
Daniel Dunbar [Thu, 30 Jul 2009 01:57:45 +0000 (01:57 +0000)]
MultiTestRunner: Stop printing XFAILs on every run, this doesn't really have any
value.
llvm-svn: 77566
Dan Gohman [Thu, 30 Jul 2009 01:56:29 +0000 (01:56 +0000)]
Add a new register class to describe operands that can't be SP,
due to x86 encoding restrictions. This is currently off by default
because it may cause code quality regressions. This is for PR4572.
llvm-svn: 77565
Dan Gohman [Thu, 30 Jul 2009 01:33:17 +0000 (01:33 +0000)]
Minor whitespace tidiness.
llvm-svn: 77564
Zhongxing Xu [Thu, 30 Jul 2009 01:17:21 +0000 (01:17 +0000)]
This patch collects all analysis context data into a new class
AnalysisContext.
llvm-svn: 77563
Eli Friedman [Thu, 30 Jul 2009 01:10:26 +0000 (01:10 +0000)]
Remove bogus "unsupported" case for vectors (which shouldn't
ever trigger). Add an "unsupported" case that triggers for C++ code.
It would be nice if someone would implement this properly... it
shouldn't be too hard, but I haven't looked closely at the relevant
code.
llvm-svn: 77562
Mike Stump [Thu, 30 Jul 2009 01:02:10 +0000 (01:02 +0000)]
Fix type to be consistent with the rest of the code.
llvm-svn: 77560
Devang Patel [Thu, 30 Jul 2009 01:02:04 +0000 (01:02 +0000)]
Check null NameMDNode elements.
llvm-svn: 77559
Dan Gohman [Thu, 30 Jul 2009 00:40:42 +0000 (00:40 +0000)]
Eliminate a bunch of redundant tables.
llvm-svn: 77558
Bob Wilson [Thu, 30 Jul 2009 00:31:25 +0000 (00:31 +0000)]
Lower a 128-bit BUILD_VECTOR with 2 elements to a pair of INSERT_VECTOR_ELTs.
llvm-svn: 77557
Mike Stump [Thu, 30 Jul 2009 00:22:38 +0000 (00:22 +0000)]
Add ability to layout the vtable pointer in trivial cases. I noticed
that we would silently do bad things with virtual bases in the layout
code, so, we just turn them off. When people do better things with
them, we can turn them back on.
llvm-svn: 77556
Eli Friedman [Thu, 30 Jul 2009 00:11:31 +0000 (00:11 +0000)]
Fix gcc warning.
llvm-svn: 77555
Fariborz Jahanian [Thu, 30 Jul 2009 00:10:25 +0000 (00:10 +0000)]
ir-gen for nested non-virtual base member access
in current class.
llvm-svn: 77554
Dan Gohman [Thu, 30 Jul 2009 00:10:18 +0000 (00:10 +0000)]
Use array_endof instead of doing it manually.
llvm-svn: 77553
Eli Friedman [Thu, 30 Jul 2009 00:04:39 +0000 (00:04 +0000)]
Add support for -Wno-long-long.
llvm-svn: 77552
Argyrios Kyrtzidis [Thu, 30 Jul 2009 00:03:55 +0000 (00:03 +0000)]
Add support for ObjC message expressions, in the Analyzer:
-Accept an ObjC method and find all message expressions that this method may respond to.
-Accept an ObjC message expression and find all methods that may respond to it.
llvm-svn: 77551
Devang Patel [Thu, 30 Jul 2009 00:03:41 +0000 (00:03 +0000)]
Add NamedMDNode test.
llvm-svn: 77550
Devang Patel [Thu, 30 Jul 2009 00:02:57 +0000 (00:02 +0000)]
print single NamedMDNode.
llvm-svn: 77549
Argyrios Kyrtzidis [Thu, 30 Jul 2009 00:02:19 +0000 (00:02 +0000)]
Update CMake.
llvm-svn: 77548
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:46 +0000 (23:41 +0000)]
Support ObjC methods as Entities.
llvm-svn: 77547
Douglas Gregor [Wed, 29 Jul 2009 23:41:44 +0000 (23:41 +0000)]
There's no point in going through the getAs<TagType> stuff to find the definition of a tag, since tags rarely have more than one or two declarations
llvm-svn: 77546
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:33 +0000 (23:41 +0000)]
Use a STL helper template 'pair_value_iterator', by both DeclReferenceMap and SelectorMap.
llvm-svn: 77545
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:26 +0000 (23:41 +0000)]
Add ObjCMethodDecl::isThisDeclarationADefinition().
llvm-svn: 77544
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:18 +0000 (23:41 +0000)]
Index the selectors and provide the translation units that contain them
through the IndexProvider.
llvm-svn: 77543
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:08 +0000 (23:41 +0000)]
Add TranslationUnit::getSelectorMap().
llvm-svn: 77542