Commit Graph

132230 Commits

Author SHA1 Message Date
Ted Kremenek 98b771ecc2 Review, comment, and reformat IPA.txt, including feedback comments.
Formatting includes:

- removing line wraps (Emacs Cmd-Q), to make text easier to read
- provide useful indentation
- call out caveats and notes more explictly

Stylistically, I prefer the document talk in 3rd person instead of "we".  The
term "we" is unambiguous, and sometimes refers to different things.  I've passed
over the existing paragraphs and made them speak more about specific entities
that compose the analyzer and what they do (e.g., ExprEngine) instead of "we"
referring to the analyzer.

Further, I have substituted some vague concepts such as "state" or "program
state" and replaced them with their precise implementation counterparts (e.g.,
ProgramState).  This makes the document more technically precise throughout the
entire narrative, which would sometimes use vague terms and other times precise
terms.

I've placed several comments within the document, which can be seen with
***TMK/COMMENT***, which indicate places that need to be enhanced or clarified,
or called out as questions about intended bheavior.

llvm-svn: 162338
2012-08-22 01:20:05 +00:00
Jim Grosbach c93f6c7ec5 TblGen: Make asm-matcher ConvertToMCInst() table driven.
No change in interface or functionality. Purely under-the-hood
details of the generated function that change.

The X86 assembly parser is reduced in size by over 15% and ARM by
over 10%.

No performance change by my measurements.

llvm-svn: 162337
2012-08-22 01:06:23 +00:00
Jordan Rose 6faff2e7bd [analyzer] Document our debug checkers and ExprInspection's "builtins".
llvm-svn: 162336
2012-08-22 01:03:39 +00:00
Marshall Clow c740e05316 Fix a typo in the docs
llvm-svn: 162335
2012-08-22 00:57:11 +00:00
Jack Carter 77064c0590 For mips64 switch statements in subroutines could generate
within the codegen EK_GPRel64BlockAddress. This was not 
supported for direct object output and resulted in an assertion.

This change adds support for EK_GPRel64BlockAddress for 
direct object.

One fallout from this is to turn on rela relocations 
for mips64 to match gas.

llvm-svn: 162334
2012-08-22 00:49:30 +00:00
Richard Smith 3fb2047f82 Initialize SelectionDAGBuilder's Context in 'init', not in its constructor. The
SelectionDAG's 'init' has not been called when the SelectionDAGBuilder is
constructed (in SelectionDAGISel's constructor), so this was previously always
initialized with 0.

llvm-svn: 162333
2012-08-22 00:42:39 +00:00
Johnny Chen 82e5a26240 rdar://problem/11324515
'add-dsym' (aka 'target symbols add') should display error messages when dsym file is not found
or the dsym uuid does not match any existing modules. Add TestAddDsymCommand.py test file.

llvm-svn: 162332
2012-08-22 00:18:43 +00:00
Richard Smith 24f09cc82d Reduce alignment of SmallVector<T> to the required amount, rather than forcing 16-byte alignment. This fixes misaligned SmallVector accesses via ExtractValueInst's SmallVector data member.
llvm-svn: 162331
2012-08-22 00:11:07 +00:00
Ted Kremenek 34d39287b5 Consilidate SmallPtrSet count() followed by insert() into a single insert().
llvm-svn: 162330
2012-08-22 00:02:08 +00:00
Chad Rosier 7fb0cd26f7 Add a few functions to TargetLibraryInfo as part of PR13574.
Patch by Weiming Zhao <weimingz@codeaurora.org>.

llvm-svn: 162329
2012-08-21 23:28:56 +00:00
Johnny Chen 4fe2302ae2 Fix test failures in TestWatchpointIter.py due to http://llvm.org/viewvc/llvm-project?rev=162322&view=rev.
llvm-svn: 162328
2012-08-21 23:17:04 +00:00
Chad Rosier bbdd467895 [ms-inline asm] Remove the patchMSAsmStrings function. After some discussion
between Bob, Jim, Eric and I, we've decided to take a slightly different
approach.

llvm-svn: 162327
2012-08-21 23:09:21 +00:00
Matt Beaumont-Gay 64621ea530 Add an llvm_unreachable to pacify GCC's -Wreturn-type.
llvm-svn: 162325
2012-08-21 22:27:18 +00:00
Fariborz Jahanian 27400e003c make test pass on linux platforms.
llvm-svn: 162324
2012-08-21 22:21:43 +00:00
Johnny Chen 66535a3f88 Remove the process->DisableWatchpoint() and EnableWatchpoint() calls since the sentry object is already doing that.
llvm-svn: 162323
2012-08-21 22:15:58 +00:00
Johnny Chen 0f7ad8d98f rdar://problem/12144930
Watchpoint conditions were hitting watchpoint, smashing LLDB's stack.
Make sure watchpoint is properly disabled and subsequently enabled while performing watchpoint actions.

llvm-svn: 162322
2012-08-21 22:06:34 +00:00
Chad Rosier b958037958 [ms-inline asm] Have buildMSAsmString build a vector of unmodified AsmStrings.
Add a new static function, buildMSAsmPieces, that will break these strings down
into mnemonic and operands.  Upon a match failure, the idea is to use the
ErrorInfo from MatchInstructionImpl to inspect the mnemonic/operand and 
decide a course of action.  Unfortunately, there's no easy way to test this at
the moment.

llvm-svn: 162321
2012-08-21 21:56:39 +00:00
Fariborz Jahanian ea262f7936 change function name in my last patch.
// rdar://12103400

llvm-svn: 162320
2012-08-21 21:52:02 +00:00
Fariborz Jahanian 8d1ca5a142 objective-C: Change rules for overriding properties in
class extensions a little. clang now allows readonly property 
with no ownership rule (assign, unsafe_unretained, weak, retain, 
strong, or copy) with a readwrite property with an ownership rule.
// rdar://12103400 

llvm-svn: 162319
2012-08-21 21:45:58 +00:00
Jordan Rose e3e95cdf27 [analyzer] Set the default IPA mode to 'basic-inlining', which excludes C++.
Under -analyzer-ipa=basic-inlining, only C functions, blocks, and C++ static
member functions are inlined -- essentially, the calls that behave like simple
C function calls. This is essentially the behavior in Xcode 4.4.

C++ support still has some rough edges, and we don't want users to be worried
about them if they download and run their own checker. (In particular, the
massive number of false positives for analyzing LLVM comes from inlining
defensively-written code in contexts where more aggressive assumptions are
implicitly made. This problem is not unique to C++, but it is exacerbated by
the higher proportion of code that lives in header files in C++.)

The eventual goal is to be comfortable enough with C++ support (and simple
Objective-C support) to advance to -analyzer-ipa=inlining as the default
behavior. See the IPA design notes for more details.

llvm-svn: 162318
2012-08-21 21:44:21 +00:00
Jordan Rose 4d9fbd7ec4 [analyzer] -analyzer-ipa=inlining is now the default. Remove it from tests.
The actual change here is a little more complicated than the summary above.
What we want to do is have our generic inlining tests run under whatever
mode is the default. However, there are some tests that depend on the
presence of C++ inlining, which still has some rough edges. These tests have
been explicitly marked as -analyzer-ipa=inlining in preparation for a new
mode that limits inlining to C functions and blocks. This will be the
default until the false positives for C++ have been brought down to
manageable levels.

llvm-svn: 162317
2012-08-21 21:44:07 +00:00
Dmitri Gribenko f6e2a4a15a Update comment to match the reality.
llvm-svn: 162316
2012-08-21 21:35:58 +00:00
Dmitri Gribenko 75eea89920 CommentBriefParser: allow paragraphs to be separated by line of whitespace.
Skip paragraphs that contain only whitespace.

llvm-svn: 162315
2012-08-21 21:15:34 +00:00
Richard Smith 976f8605e2 MaximumSpanningTree::EdgeWeightCompare: Make this comparator actually be a
strict weak ordering, and don't pass possibly-null pointers to dyn_cast.

llvm-svn: 162314
2012-08-21 21:03:40 +00:00
Jordan Rose 81125c4497 [analyzer] Push "references are non-null" knowledge up to the common parent.
This reduces duplication across the Basic and Range constraint managers, and
keeps their internals free of dealing with the semantics of C++. It's still
a little unfortunate that the constraint manager is dealing with this at all,
but this is pretty much the only place to put it so that it will apply to all
symbolic values, even when embedded in larger expressions.

llvm-svn: 162313
2012-08-21 20:52:19 +00:00
Richard Smith da32944cac Fix misaligned access in MachO object file reader: despite containing an
int64_t, Symbol64TableEntry is actually only stored with 4-byte alignment
within the file.

The usage of #pragma pack here is copied from the corresponding code in
Support/Endian.h, so shouldn't introduce any new portability problems.

llvm-svn: 162312
2012-08-21 20:52:03 +00:00
Richard Smith 13473857a7 Fix unaligned memory accesses when performing relocations in X86 JIT. There's
no cost to using memcpy here: the fixed code is optimized by LLVM to perfect
machine code.

llvm-svn: 162311
2012-08-21 20:48:36 +00:00
Richard Smith c4379c3b7e Don't pass a null pointer to cast<> in its unit tests.
llvm-svn: 162310
2012-08-21 20:39:25 +00:00
Richard Smith ad9c8e839e Don't bind a reference to a dereferenced null pointer (for return value of WeakVH::operator*).
llvm-svn: 162309
2012-08-21 20:35:14 +00:00
Johnny Chen 393fbf6c53 Comment change.
llvm-svn: 162308
2012-08-21 20:18:21 +00:00
Chad Rosier 5111f8650d [ms-inline asm] Do not report a Parser error when matching inline assembly.
llvm-svn: 162307
2012-08-21 19:37:55 +00:00
Chad Rosier 3d4bc62a5c [ms-inline asm] Do not report a Parser error when matching inline assembly.
llvm-svn: 162306
2012-08-21 19:36:59 +00:00
David Blaikie f737cb3b92 Ignore the documentation-suggested location for compile_commands.json
According to http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html
it's suggested that compile_commands.json in the root of the LLVM source tree
should be a symlink to the json file produced by your build system of choice.

So here's a patch so it doesn't turn up in git status, etc.

llvm-svn: 162305
2012-08-21 19:23:30 +00:00
David Blaikie a77f8c8cad The presence of the empty file "foo" unfortunately does not improve LLVM in any way.
Thanks to Duncan Sands for catching this random file in code review.

llvm-svn: 162304
2012-08-21 19:13:12 +00:00
Fariborz Jahanian f1f36c6a9a Modern objc translator: Fixes a crash in rewriter when rewriting the API
for structure valued method messaging. // rdar://12142241

llvm-svn: 162303
2012-08-21 18:56:50 +00:00
David Blaikie 5bd4c2ace4 Use LLVM_BUILTIN_TRAP instead of lame volatile int traps.
(from a todo mentioned in r159469 & originally suggested by Chandler Carruth)

llvm-svn: 162302
2012-08-21 18:56:49 +00:00
David Blaikie 9c7226b456 Remove unnecessary cast that was also unnecessarily casting away constness.
Even looking at the revision history I couldn't quite piece together why this
cast was ever written in the first place, but I assume it was because of some
change in the inheritance, perhaps this function was reimplemented in a
derived type & this caller was meant to get the base version (& it wasn't
virtual)?

llvm-svn: 162301
2012-08-21 18:54:23 +00:00
David Blaikie a789c40380 Provide a portability macro for __builtin_trap.
llvm-svn: 162300
2012-08-21 18:54:21 +00:00
Michael J. Spencer d492219e59 Reduce the amount of state in the Option class by relying on the data from OptTable::Info.
llvm-svn: 162299
2012-08-21 18:51:17 +00:00
Rafael Espindola 2c06448360 Fix macros arguments with an underscore, dot or dollar in them. This is based
on a patch by Andy/PaX. I added the support for dot and dollar.

llvm-svn: 162298
2012-08-21 18:29:30 +00:00
Richard Smith a75e1cff0a Switch some realignment calculations over to llvm::RoundUpToAlignment.
llvm-svn: 162297
2012-08-21 18:18:06 +00:00
Chad Rosier 19160b6e39 [ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,
this is the index of the operand that failed to match.

llvm-svn: 162296
2012-08-21 18:15:08 +00:00
Chad Rosier 79e766c38e [ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,
this is the index of the operand that failed to match.

Note: This may cause a buildbot failure due to an API mismatch in clang.  Should
recover with my next commit to clang.

llvm-svn: 162295
2012-08-21 18:14:59 +00:00
Dmitri Gribenko a9a2af7893 DeclPrinter, terse mode: don't print function bodies
llvm-svn: 162294
2012-08-21 17:47:24 +00:00
Dmitri Gribenko a93a7e8d5e Rename PrintingPolicy::DontRecurseInDeclContext to PrintingPolicy::TerseOutput
to reflect the intention, not the implementation.

llvm-svn: 162293
2012-08-21 17:36:32 +00:00
Chad Rosier 4ee038421b Formatting. No functional change.
llvm-svn: 162292
2012-08-21 17:22:47 +00:00
Rafael Espindola af6da83a2c Make the wording in of the "expected identifier" error in the .macro directive
consistent with the other "expected identifier" errors.
Extracted from the Andy/PaX patch. I added the test.

llvm-svn: 162291
2012-08-21 17:12:05 +00:00
Chad Rosier 5e80ced3f6 [ms-inline asm] Append identifier for better debugging.
llvm-svn: 162289
2012-08-21 17:02:27 +00:00
Chad Rosier b84cc6cfa3 [ms-inline asm] Remove this test case and the associated special case code.
llvm-svn: 162288
2012-08-21 17:01:26 +00:00
Marshall Clow 2a6415ec04 Make Mr. Pedantic happy by fixing banner to be exactly 80 columns
llvm-svn: 162287
2012-08-21 16:29:41 +00:00