Commit Graph

132273 Commits

Author SHA1 Message Date
Benjamin Kramer
e07728b936 SimplifyLibCalls: Give all safely-shrinkable libcalls the same treatment.
llvm-svn: 162383
2012-08-22 19:39:15 +00:00
Chad Rosier
d997bd1422 [ms-inline asm] Start sending non-simple inline asms to the AsmParser.
The parser still can't handle all cases, so fall back to emitting a simple
MSAsmStmt if we get into trouble.

llvm-svn: 162382
2012-08-22 19:18:30 +00:00
Chad Rosier
cf172e5e28 [ms-inline asm] Avoid a false positive assertion
Assertion failed: (Start.isValid() == End.isValid() && "Start and end should 
either both be valid or both be invalid!")

when parsing inline asm.  SMLoc assumes that the first char * in the source is
invalid.  However, when parsing an inline asm the mnemonic is at this location.
I don't want to change SMLoc, so use a trivial workaround.

llvm-svn: 162381
2012-08-22 19:14:29 +00:00
Benjamin Kramer
c4aecf9994 Make ceil/floor/nearbyint/rint/round const even with -fmath-errno.
The conditions described by POSIX can never happen with IEEE-754 floats.
When the function is const we can emit a single sse4.1 instruction for
it, without losing anything :)

llvm-svn: 162379
2012-08-22 18:50:01 +00:00
Johnny Chen
c50ce97745 Demonstrate how to use the config file and the pre-flight functionality to route the lldb gdb-remote log messages
into individually named log destinations.  In the simple usage-lldb-loggings example, we ran two cases which resulted
in two lldb_log files.

llvm-svn: 162378
2012-08-22 18:48:13 +00:00
Greg Clayton
6920b52be6 Remove further outdated "settings" code and also implement a few missing things.
llvm-svn: 162376
2012-08-22 18:39:03 +00:00
Benjamin Kramer
6f0bf8049a Math builtin definition tweaks.
There were missed optimizations when the system headers didn't have attributes
in place, specifically:

- Add copysign, exp2, log2, nearbyint, rint and trunc to the list.
  These are functions that get inlined by LLVM's optimizer, but only when they
  have the right attributes.
- Mark copysign, fabs, fmax, fmin and trunc const unconditionally.
  Previously these were only const with -fno-math-errno, but they never set
  errno per POSIX.

For ceil/floor/nearbyint/round I'm not aware of any implementation that sets
errno, but POSIX says it may signal overflow so I left them alone for now.

llvm-svn: 162375
2012-08-22 18:16:02 +00:00
Dmitri Gribenko
bfda9f75d6 ASTContext::getCommentForDecl: add comment.
llvm-svn: 162374
2012-08-22 18:12:19 +00:00
Filipe Cabecinhas
2c0978a4ac Fixed a Linux building bug pointed out by Daniel Malea.
llvm-svn: 162373
2012-08-22 18:10:45 +00:00
Johnny Chen
e3fe26c5dd Fix wrong directory pathname.
llvm-svn: 162372
2012-08-22 17:53:02 +00:00
Dmitri Gribenko
90631809cb Attaching comments to declarations: when documentation is requested for an
implicit instantiation, look for documentation attached to the template.

llvm-svn: 162371
2012-08-22 17:44:32 +00:00
Chad Rosier
1df1fb511f Whitespace.
llvm-svn: 162370
2012-08-22 17:34:11 +00:00
Chad Rosier
671dc096ae Add test case for r162368.
llvm-svn: 162369
2012-08-22 17:31:04 +00:00
Chad Rosier
0122909d95 Add a few float shrinking optimizations to SimplifyLibCalls. Unsafe
optimizations are guarded by the -enable-double-float-shrink LLVM option.
Last bit of PR13574.  Patch by Weiming Zhao <weimingz@codeaurora.org>.

llvm-svn: 162368
2012-08-22 17:22:33 +00:00
David Blaikie
c8c2920a3f Tidy up a few more uses of MF.getFunction()->getName().
Based on CR feedback from r162301 and Craig Topper's refactoring in r162347
here are a few other places that could use the same API (& in one instance drop
a Function.h dependency).

llvm-svn: 162367
2012-08-22 17:18:53 +00:00
Greg Clayton
67cc06366c Reimplemented the code that backed the "settings" in lldb. There were many issues with the previous implementation:
- no setting auto completion
- very manual and error prone way of getting/setting variables
- tons of code duplication
- useless instance names for processes, threads

Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing".

llvm-svn: 162366
2012-08-22 17:17:09 +00:00
Jordan Rose
40dd4d9bf3 [analyzer] Restructure discussion of DynamicTypeInfo and RuntimeDefinition.
Since DynamicTypeInfo is not inherently related to inlining or to dynamic
calls, it makes more sense (to me) to discuss it first.

Also fix some typos, massage some grammar, and (hopefully) improve precision
and clarity.

llvm-svn: 162365
2012-08-22 17:13:27 +00:00
Jordan Rose
d3d6ac65f8 [analyzer] Per feedback, re-structure the docs for ExprInspection checks.
Also, remove the FIXME about merging -analyzer-stats and the debug.Stats
checker. This would be a bad idea because simply running debug.Stats can
affect the output of -analyzer-stats.

llvm-svn: 162364
2012-08-22 17:13:22 +00:00
Chad Rosier
b2f5c1cdbb Add a new helper function, AddOpt(F1, F1, Opt), as part of PR13574. No
functional change intended.  Patch by Weiming Zhao <weimingz@codeaurora.org>.

llvm-svn: 162363
2012-08-22 16:52:57 +00:00
Benjamin Kramer
f29db275b2 Reduce duplicated hash map lookups.
llvm-svn: 162362
2012-08-22 15:37:57 +00:00
Benjamin Kramer
fc6eb7d383 Reduce duplicated hash map lookups.
llvm-svn: 162361
2012-08-22 15:37:55 +00:00
Rafael Espindola
0c6c405e23 Merge existing attributes before processing pragmas in friend template
declarations.
Fixes pr13662.

llvm-svn: 162360
2012-08-22 14:52:14 +00:00
Alexey Samsonov
4d520640ba [ASan] use write instead of puts in malloc hooks test for ASan, as puts calls malloc on Mac
llvm-svn: 162359
2012-08-22 13:32:37 +00:00
Alexey Samsonov
a85b6b8154 [ASan] get rid of ASAN_USE_EXTERNAL_SYMBOLIZER compiler def in favor of __asan_set_symbolize_callback interface function. Now the user doesn't have to recompile ASan runtime to provide its own symbolizer
llvm-svn: 162358
2012-08-22 13:31:37 +00:00
Filipe Cabecinhas
9e10605d6b Added a test for the Python part of SBInputReader callbacks.
llvm-svn: 162357
2012-08-22 13:25:58 +00:00
Filipe Cabecinhas
6eb31e7391 Added a typemap and wrappers for SBInputReader callbacks
Now it's possible to use SBInputReader callbacks in Python.

We leak the callback object, unfortunately. A __del__ method can be added
to SBInputReader, but we have no way to check the callback function that
is on the reader. So we can't call Py_DECREF on it when we have our
PythonCallback function. One way to do it is to assume that reified
SBInputReaders always have a Python callback (and always call Py_DECREF).
Another one is to add methods or properties to SBInputReader (or make the
m_callback_function property public).

llvm-svn: 162356
2012-08-22 13:25:10 +00:00
Alexey Samsonov
de17f86655 [ASan] make ASan malloc/free hooks weak interface functions, overridable by user. Now the user can control malloc/free hooks without recompiling ASan runtime
llvm-svn: 162355
2012-08-22 10:12:47 +00:00
Stepan Dyatkovskiy
99120e04be Rejected 169195. As Duncan commented, bitcasting to proper type is wrong approach. We need to insert some valid TRANCATE node here.
llvm-svn: 162354
2012-08-22 09:33:55 +00:00
Alexey Samsonov
9b4e440c44 [ASan] fix CMake build: make sure that all ASan runtimes are built at correct directory
llvm-svn: 162353
2012-08-22 09:19:32 +00:00
Benjamin Kramer
7f19035fe0 Fix typo in debug method.
llvm-svn: 162352
2012-08-22 08:38:23 +00:00
Alexey Samsonov
75e5fc3e57 [TSan] switch tsan to using InternalScopedBuffer from sanitizer_common
llvm-svn: 162351
2012-08-22 07:25:52 +00:00
Ted Kremenek
6269888166 Rename 'unbindLoc()' (in ProgramState) and 'Remove()' to
'killBinding()'.  The name is more specific, and one just forwarded
to the other.

Add some doxygen comments along the way.

llvm-svn: 162350
2012-08-22 06:37:46 +00:00
Ted Kremenek
d94854a42e Rename 'currentX' to 'currX' throughout analyzer and libAnalysis.
Also rename 'getCurrentBlockCounter()' to 'blockCount()'.

This ripples a bunch of code simplifications; mostly aesthetic,
but makes the code a bit tighter.

llvm-svn: 162349
2012-08-22 06:26:15 +00:00
Ted Kremenek
d227833cba Rename 'getConjuredSymbol*' to 'conjureSymbol*'.
No need to have the "get", the word "conjure" is a verb too!
Getting a conjured symbol is the same as conjuring one up.

This shortening is largely cosmetic, but just this simple changed
cleaned up a handful of lines, making them less verbose.

llvm-svn: 162348
2012-08-22 06:26:06 +00:00
Craig Topper
a538d831e6 Add a getName function to MachineFunction. Use it in places that previously did getFunction()->getName(). Remove includes of Function.h that are no longer needed.
llvm-svn: 162347
2012-08-22 06:07:19 +00:00
Ted Kremenek
1afcb7442f Remove Store::bindDecl() and Store::bindDeclWithNoInit(), and
all forwarding methods.

This functionality is already covered by bindLoc().

llvm-svn: 162346
2012-08-22 06:00:18 +00:00
Ted Kremenek
2cd56c4c6e Rename 'BindCompoundLiteral' to 'bindCompoundLiteral' and
add doxygen comments.

llvm-svn: 162345
2012-08-22 06:00:12 +00:00
Craig Topper
056dfcccb7 Don't cache the MBB in the class. Its only used by one function. Change a for loop over operands to use unsigned instead of int.
llvm-svn: 162344
2012-08-22 05:59:59 +00:00
Anna Zaks
545588f9ed [analyzer] IPA document: address Ted's review comments (path
bifurcation)

llvm-svn: 162343
2012-08-22 05:38:38 +00:00
Craig Topper
455bcafa3b Mark a function as static since it doesn't use anything in the class.
llvm-svn: 162342
2012-08-22 05:36:44 +00:00
Ted Kremenek
086011f8c0 Remove stale header file.
llvm-svn: 162341
2012-08-22 04:42:05 +00:00
Akira Hatanaka
ad4950258b Add register Mips::GP to the list of reserved registers if target is bare-metal
to prevent it from being clobbered. mips uses $gp to access small data section.

This bug was originally reported by Carl Norum.

llvm-svn: 162340
2012-08-22 03:18:13 +00:00
Akira Hatanaka
9d957842e1 Add option disable-mips-delay-filler. Turn on mips' delay slot filler by
default.

Patch by Carl Norum.

llvm-svn: 162339
2012-08-22 02:51:28 +00:00
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