Commit Graph

130198 Commits

Author SHA1 Message Date
Fariborz Jahanian 97920394c0 Added a new memberfor Parser, to be used soon
for doing delayed parsing of c++ method defined in
objc class implementations.

llvm-svn: 159792
2012-07-06 00:42:20 +00:00
Howard Hinnant 6b45660f14 link to Marshall's notes.
llvm-svn: 159791
2012-07-06 00:39:38 +00:00
Dmitri Gribenko ec92531c29 Implement AST classes for comments, a real parser for Doxygen comments and a
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think about before.

Comments AST is modelled along the ideas of HTML AST: block and inline content.

* Block content is a paragraph or a command that has a paragraph as an argument
  or verbatim command.
* Inline content is placed within some block.  Inline content includes plain
  text, inline commands and HTML as tag soup.

llvm-svn: 159790
2012-07-06 00:28:32 +00:00
Dmitri Gribenko d5200f1bc4 Enable new[] on llvm::BumpPtrAllocator.
llvm-svn: 159789
2012-07-06 00:25:39 +00:00
Argyrios Kyrtzidis 89b928eb6a [objcmt] Check for classes that accept 'objectForKey:' (or the other selectors
that the migrator handles) but return their instances as 'id', resulting
in the compiler resolving 'objectForKey:' as the method from NSDictionary.

When checking if we can convert to subscripting syntax, check whether
the receiver is a result of a class method from a hardcoded list of
such classes. In such a case return the specific class as the interface
of the receiver.

llvm-svn: 159788
2012-07-06 00:07:09 +00:00
Jack Carter b2af512cef Mips specific inline asm operand modifier D.
Print the second half of a double word operand.
   
   The include list was cleaned up a bit as well.
   
   Also the test case was modified to test for both
   big and little patterns.
   

llvm-svn: 159787
2012-07-05 23:58:21 +00:00
Owen Anderson 00da236f7e Fix an overzealous assertion. It is legitimate for a target to have multiple fixups on a single instruction that target the same byte, so long as their bit-offsets are coordinates appropriately.
llvm-svn: 159785
2012-07-05 22:30:42 +00:00
Fariborz Jahanian 31a2568096 objective-c: don't involve properties when checking
under -Wsuper-class-method-mismatch for method
mismatches in current and suprt class.
// rdar://11793793

llvm-svn: 159784
2012-07-05 22:26:07 +00:00
Argyrios Kyrtzidis 13b92929dc [objcmt] Allow migrating to subscripting syntax for other classes
(apart from NSDictionary/NSArray) that implement objectForKey:/objectAtIndex/etc.
and the subscripting methods as well.

Part of rdar://11734969

llvm-svn: 159783
2012-07-05 21:49:51 +00:00
Han Ming Ong a96ba8768b <rdar://problem/11806995>
Need to include QA MAS certificate leaf for root XPC service

llvm-svn: 159782
2012-07-05 21:46:53 +00:00
DeLesley Hutchins 09bcefcb6d Thread-safety analysis: eliminate false positives in case where the definition
duplicates attributes on the declaration.  Also eliminates a false negative in
ReleasableMutexLock.  Fixing this bug required some refactoring.

llvm-svn: 159780
2012-07-05 21:16:29 +00:00
Anna Zaks 40b87fc1f9 [analyzer] Add a statistic for maximum CFG size and a script to summarize analyzer stats from scan-build output.
llvm-svn: 159776
2012-07-05 20:44:02 +00:00
Greg Clayton 39cacebd26 Added a new example that extracts all global variables from an object file and prints any available info.
llvm-svn: 159775
2012-07-05 20:24:41 +00:00
Simon Atanasyan 9780e4a2bb MIPS: Define __mips_dsp_rev / __mips_dspr2 / __mips_dsp macros
if -mdsp or -mdspr2 options are provided.

llvm-svn: 159774
2012-07-05 20:16:22 +00:00
Fariborz Jahanian 8de7955f35 objective-c++ parsing. Turn off delayed parsing
of out-of-line c++ method definition which happens
to be inside an objc class implementation
until I can figure out how to do it. This is to fix 
a broken project.

llvm-svn: 159772
2012-07-05 19:34:20 +00:00
Akira Hatanaka bbf374c4c6 test case for r159770.
llvm-svn: 159771
2012-07-05 19:29:31 +00:00
Akira Hatanaka 7d33c78e3b Enclose instruction rdhwr with directives, which are needed when target is
mips32 rev1 (the directives are emitted when target is mips32r2 too).

llvm-svn: 159770
2012-07-05 19:26:38 +00:00
Simon Atanasyan 9c6f1f7f23 MIPS: Add -mdsp/-mno-dsp and -mdspr2/-mno-dspr2 command line options support.
llvm-svn: 159769
2012-07-05 19:23:00 +00:00
Akira Hatanaka d359075e43 Enable target dependent directive parsing to hook before standard parser in
AsmParser::ParseStatement.

Patch by Vladimir Medic.

llvm-svn: 159768
2012-07-05 19:09:33 +00:00
Simon Atanasyan 9b1932d4e4 MIPS: Factor out the code converting command line options to target features.
llvm-svn: 159767
2012-07-05 18:51:43 +00:00
Jordan Rose 2783b6c0e5 Release notes for r158230 "Disallow using ObjC literals in direct comparisons"
This may turn out to be a controversial change, due to string literals being
uniqued at link time, but Apple's docs only say "The compiler makes such
object constants unique on a per-module basis..."[1] without actually saying
what a "module" is. (It's not a clang module.) Furthermore, this uniqueness
guarantee often can't be guaranteed once the string has been passed through
framework code.

If this does turn out very controversial, we could downgrade this to a
DefaultError warning for strings, and leave it as a true Error for other
kinds of literals.

(<rdar://problem/11300873>)

[1]: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/CreatingStrings.html

llvm-svn: 159766
2012-07-05 18:48:30 +00:00
Manuel Klimek 5da9dcb275 Adapts the FrontendAction convenience functions so that it can be
used with classes that generate ASTConsumers; this allows decoupling
the ASTConsumer generation from the Frontend library (like, for example,
the MatchFinder in the upcoming ASTMatcher patch).

llvm-svn: 159760
2012-07-05 18:13:01 +00:00
Nuno Lopes 4d6c832165 add @llvm.donothing
llvm-svn: 159758
2012-07-05 17:37:07 +00:00
Dmitry Vyukov 03d32ecd4f tsan: Go language support
llvm-svn: 159754
2012-07-05 16:18:28 +00:00
Simon Atanasyan 72244b6e4f MIPS: Define __mips16 macro if -mips16 option is provided.
llvm-svn: 159753
2012-07-05 16:06:06 +00:00
Simon Atanasyan 9f444d5a1b MIPS: Replace the pair of boolean flags by enumeration to hold selected float ABI.
llvm-svn: 159752
2012-07-05 15:32:46 +00:00
Alexander Potapenko 25b567dd0d Fix http://code.google.com/p/address-sanitizer/issues/detail?id=87 by making sure we replace the default CFAllocator only after __CFInitialize has been called.
llvm-svn: 159749
2012-07-05 14:46:56 +00:00
Alexey Samsonov 38b1ec4317 [ASan] Add a default constructor for DWARFSection to initialize it with zeros.
llvm-svn: 159748
2012-07-05 14:28:37 +00:00
Simon Atanasyan 6f23fa0f18 MIPS: Add -mips16 / -mno-mips16 command line support.
llvm-svn: 159747
2012-07-05 14:19:39 +00:00
Chandler Carruth 1088676476 Optimize extendIntervalEndTo a tiny bit by saving one call through the
vector erase. No functionality changed.

llvm-svn: 159746
2012-07-05 12:40:45 +00:00
Chandler Carruth 853d14b7b6 Remove dead infrastructure for building DenseMaps with a SlotIndex as
the key -- they are now stored in an IntervalMap.

I noticed this while looking into PR12652.

llvm-svn: 159745
2012-07-05 11:40:23 +00:00
Simon Atanasyan f438281e04 Give test check tags consistent names.
llvm-svn: 159744
2012-07-05 11:30:19 +00:00
Chandler Carruth 264854f9a0 Finish fixing the MachineOperand hashing, providing a nice modern
hash_value overload for MachineOperands. This addresses a FIXME
sufficient for me to remove it, and cleans up the code nicely too.

The important changes to the hashing logic:
- TargetFlags are now included in all of the hashes. These were complete
  missed.
- Register operands have their subregisters and whether they are a def
  included in the hash.
- We now actually hash all of the operand types. Previously, many
  operand types were simply *dropped on the floor*. For example:
  - Floating point immediates
  - Large integer immediates (>64-bit)
  - External globals!
  - Register masks
  - Metadata operands
- It removes the offset from the block-address hash; I'm a bit
  suspicious of this, but isIdenticalTo doesn't consider the offset for
  black addresses.

Any patterns involving these entities could have triggered extreme
slowdowns in MachineCSE or PHIElimination. Let me know if there are PRs
you think might be closed now... I'm looking myself, but I may miss
them.

llvm-svn: 159743
2012-07-05 11:06:22 +00:00
Duncan Sands 71dacd09fe All cases are covered, no need for a default. This deals with the
corresponding clang warning.

llvm-svn: 159742
2012-07-05 10:14:33 +00:00
Chandler Carruth 1d5d23106e The hash function for MI expressions, used by MachineCSE, is really
broken. This patch fixes the superficial problems which lead to the
intractably slow compile times reported in PR13225.

The specific issue is that we were failing to include the *offset* of
a global variable in the hash code. Oops. This would in turn cause all
MIs which were only distinguishable due to operating on different
offsets of a global variable to produce identical hash functions. In
some of the test cases attached to the PR I saw hash table activity
where there were O(1000) probes-per-lookup *on average*. A very few
entries were responsible for most of these probes.

There is still quite a bit more to do here. The ad-hoc layering of data
in MachineOperands makes them *extremely* brittle to hash correctly.
We're missing quite a few other cases, the only ones I've fixed here are
the specific MO types which were allowed through the assert() in
getOffset().

llvm-svn: 159741
2012-07-05 10:03:57 +00:00
Duncan Sands 0552a2cad2 Use the right kind of booleans: we were emitting 0/1 booleans, instead of 0/-1
booleans.  Patch by James Benton.

llvm-svn: 159739
2012-07-05 09:32:46 +00:00
Dmitry Vyukov 5dc3f01676 tsan/asan: kill STL
First, placement new from standard library conflicts with our own.
Second, we are in trouble if user uses the same function (we either get instrumented code in runtime, or non-instrumented code in user program).

llvm-svn: 159738
2012-07-05 09:23:37 +00:00
Kostya Serebryany ba235522e0 [tsan] reg test for tsan issue #3
llvm-svn: 159737
2012-07-05 09:09:40 +00:00
Kostya Serebryany e36ae68803 [tsan] fix compile-time falilure found while building Chromium with tsan (tsan issue #3). A unit test will follow separately.
llvm-svn: 159736
2012-07-05 09:07:31 +00:00
Hongbin Zheng 454e8f9ee8 Add stringFromIslObj support for various isl_objs.
Patched by JunQi<dengjunqi06323011@hotmail.com>.

llvm-svn: 159735
2012-07-05 08:55:31 +00:00
Hongbin Zheng 5205e0c40e Refactor: Use generic internal function template in GICHelper.cpp to avoid duplication.
llvm-svn: 159734
2012-07-05 08:42:39 +00:00
Richard Smith d86812d95c PR13273: When performing list-initialization with an empty initializer list,
actually perform value initialization rather than trying to fake it with a call
to the default constructor. Fixes various bugs related to the previously-missing
zero-initialization in this case.

I've also moved this and the other list initialization 'special case' from
TryConstructorInitialization into TryListInitialization where they belong.

llvm-svn: 159733
2012-07-05 08:39:21 +00:00
Richard Smith 1ea42eb5a3 Fix some memory leaks found by the static analyzer. Thanks to John Smith for running it over Clang.
llvm-svn: 159732
2012-07-05 08:20:49 +00:00
Alexey Samsonov 78a3bbc82c [TSan] add a new option 'use_internal_symbolizer' that allows to choose between addr2line-based and llvm-based symbolizer w/o having to rebuild the runtime. This is hopefully a temporary solution that simplifies testing process. In the end, we should leave a single symbolizer.
llvm-svn: 159730
2012-07-05 07:18:29 +00:00
Nick Lewycky 765c699370 Remove ParentMap. You can just ask the domnode for its parent. No functionality
change.

Move the "Not profitable, avoid CSE!" debug message next to where we fail the
check for profitability and use a different message for avoiding CSE due to
being in different register classes.

llvm-svn: 159729
2012-07-05 06:19:21 +00:00
Jakob Stoklund Olesen d14101e0b9 Make X86 call and return instructions non-variadic.
Function argument and return value registers aren't part of the
encoding, so they should be implicit operands.

llvm-svn: 159728
2012-07-04 23:53:27 +00:00
Jakob Stoklund Olesen c300ef0e50 Allow trailing physreg RegisterSDNode operands on non-variadic instructions.
Also allow trailing register mask operands on non-variadic both
MachineSDNodes and MachineInstrs.

The extra physreg RegisterSDNode operands are added to the MI as
<imp-use> operands. This makes it possible to have non-variadic call
instructions.

Call and return instructions really are non-variadic, the argument
registers should only be used implicitly - they are not part of the
encoding.

llvm-svn: 159727
2012-07-04 23:53:23 +00:00
Jakob Stoklund Olesen adb50a7a09 Print SlotIndexes when available for -print-machineinstrs.
llvm-svn: 159726
2012-07-04 23:53:19 +00:00
Tobias Grosser 5c0f6f3350 Replace CUDA data types with Polly's GPGPU data types.
Contributed by:  Yabin Hu  <yabin.hwu@gmail.com>

llvm-svn: 159725
2012-07-04 21:45:03 +00:00
Benjamin Kramer eb7b9f8248 Update unittests for include change.
llvm-svn: 159724
2012-07-04 20:33:53 +00:00