Commit Graph

100572 Commits

Author SHA1 Message Date
Chris Lattner 206b065afb merge two tests.
llvm-svn: 125195
2011-02-09 17:06:41 +00:00
Chris Lattner b940091388 Rework InstrTypes.h so to reduce the repetition around the NSW/NUW/Exact
versions of creation functions.  Eventually, the "insertion point" versions
of these should just be removed, we do have IRBuilder afterall.

Do a massive rewrite of much of pattern match.  It is now shorter and less
redundant and has several other widgets I will be using in other patches.
Among other changes, m_Div is renamed to m_IDiv (since it only matches 
integer divides) and m_Shift is gone (it used to match all binops!!) and
we now have m_LogicalShift for the one client to use.

Enhance IRBuilder to have "isExact" arguments to things like CreateUDiv
and reduce redundancy within IRbuilder by having these methods chain to
each other more instead of duplicating code.

llvm-svn: 125194
2011-02-09 17:00:45 +00:00
Chris Lattner b692bed732 emit a specific error when the input file is empty. This fixes
an annoyance of mine when working on tests: if the input .ll file
is broken, opt outputs an error and generates an empty file.  FileCheck
then emits its "ooh I couldn't find the first CHECK line, scanning
from ..." which obfuscates the actual problem.

llvm-svn: 125193
2011-02-09 16:46:02 +00:00
Chris Lattner f10dfdc77a fix typo
llvm-svn: 125192
2011-02-09 16:44:44 +00:00
Chris Lattner abcf9d58f2 enrich folder interfaces around exactness.
llvm-svn: 125191
2011-02-09 16:44:36 +00:00
Chris Lattner 0d75eac350 refactor ConstantExpr interfaces a bit around "exactness".
llvm-svn: 125190
2011-02-09 16:43:07 +00:00
Chris Lattner e787786999 remove a small scattering of basically pointless tests. These are
all covered by llvm-test, which is what they were reduced from back
in 2003.

llvm-svn: 125189
2011-02-09 16:41:31 +00:00
Chris Lattner 7f4b42eee9 remove a broken test, this is matching nounwind on intrinsics, not the old unwind instruction
llvm-svn: 125188
2011-02-09 16:40:56 +00:00
David Greene b36195ab26 [AVX] Implement 256-bit vector lowering for INSERT_VECTOR_ELT.
llvm-svn: 125187
2011-02-09 15:32:06 +00:00
Richard Osborne d9dde78c27 Add intrinsic for setc instruction on the XCore.
llvm-svn: 125186
2011-02-09 13:22:12 +00:00
Nick Lewycky bae992ffd9 Non-void functions need to return some value.
llvm-svn: 125185
2011-02-09 08:42:57 +00:00
John McCall f75152fb9f Give these little helper functions definitions so that newer gccs stop
complaining.

llvm-svn: 125184
2011-02-09 08:31:17 +00:00
John McCall bd06678921 Remove vtables from the Stmt hierarchy; this was pretty easy as
there were only three virtual methods of any significance.

The primary way to grab child iterators now is with
  Stmt::child_range children();
  Stmt::const_child_range children() const;
where a child_range is just a std::pair of iterators suitable for
being llvm::tie'd to some locals.  I've left the old child_begin()
and child_end() accessors in place, but it's probably a substantial
penalty to grab the iterators individually now, since the
switch-based dispatch is kindof inherently slower than vtable
dispatch.  Grabbing them together is probably a slight win over the
status quo, although of course we could've achieved that with vtables, too.

I also reclassified SwitchCase (correctly) as an abstract Stmt
class, which (as the first such class that wasn't an Expr subclass)
required some fiddling in a few places.

There are somewhat gross metaprogramming hooks in place to ensure
that new statements/expressions continue to implement
getSourceRange() and children().  I had to work around a recent clang
bug;  dgregor actually fixed it already, but I didn't want to
introduce a selfhosting dependency on ToT.

llvm-svn: 125183
2011-02-09 08:16:59 +00:00
Zhanyong Wan 392d2ed8a1 Fix a typo in a comment in tools/clang/unittests/Frontend/Makefile.
llvm-svn: 125182
2011-02-09 07:42:47 +00:00
Greg Clayton 94d086262a File::GetFileSpec() support for linux patch from Stephen Wilson.
llvm-svn: 125181
2011-02-09 07:19:18 +00:00
Nick Lewycky 292e78c3cd When removing a function from the function set and adding it to deferred, we
could end up removing a different function than we intended because it was
functionally equivalent, then end up with a comparison of a function against
itself in the next round of comparisons (the one in the function set and the
one on the deferred list). To fix this, I introduce a choice in the form of
comparison for ComparableFunctions, either normal or "pointer only" used to
find exact Function*'s in lookups.

Also add some debugging statements.

llvm-svn: 125180
2011-02-09 06:32:02 +00:00
Ted Kremenek 435c80f5ea Initialize 'reclaimNodes'.
llvm-svn: 125179
2011-02-09 06:04:59 +00:00
NAKAMURA Takumi 1e8200d7ba test: CMake: Be aware of LLVM_LIT_TOOLS_DIR.
llvm-svn: 125178
2011-02-09 04:19:57 +00:00
NAKAMURA Takumi f214f50739 Add testing stuff to CMake documents.
- Note "GnuWin32".
  - Note LLVM_LIT_TOOLS_DIR
  - Now we can run tests on VS w/e all tests might pass or not!

llvm-svn: 125177
2011-02-09 04:19:28 +00:00
NAKAMURA Takumi 0627147d12 test/lit.cfg: Seek sane tools(and bash) in directories and set to $PATH.
LitConfig.getBashPath() will not seek in $PATH after LitConfig.getToolsPath() was executed.

llvm-svn: 125176
2011-02-09 04:19:21 +00:00
NAKAMURA Takumi edfec9d04b lit/LitConfig.py: Add the new method getToolsPath(dir,paths,tools).
It seeks tools(eg. [cmp, grep, sed]) in same directory, to be sane.

It seeks "bash" only in the directory found at last time. Or bash would be insane (against other tools).

llvm-svn: 125175
2011-02-09 04:19:15 +00:00
NAKAMURA Takumi b5c0b4667e lit/Util.py: Add two functions, checkToolsPath(dir,tools) and whichTools(tools,paths).
checkToolsPath(dir,tools):
return True if "dir" contains all "tools".

whichTools(tools,paths):
return a directory that contains all "tools" in "paths".
Or return None when all "tools" were not met.

llvm-svn: 125174
2011-02-09 04:19:06 +00:00
NAKAMURA Takumi 5b4c155112 CMake: Add the new option LLVM_LIT_TOOLS_DIR. It can specify "Path to GnuWin32 tools".
llvm-svn: 125173
2011-02-09 04:18:58 +00:00
NAKAMURA Takumi 189111808e lib/Support/Errno.cpp: Check strerror_s() with HAVE_DECL_STRERROR_S in config.h.*.
AC_CHECK_FUNCS seeks a symbol only in libs. We should check the declaration in string.h.

FIXME: I have never seen mingw(s) have strerror_s() (not _strerror_s()).
FIXME: Autoconf/CMake may seek strerror_s() with the definition MINGW_HAS_SECURE_API in future.
llvm-svn: 125172
2011-02-09 04:18:48 +00:00
NAKAMURA Takumi aeb4c0d8fb Windows/Windows.h: Redefine _WIN32_WINNT here. mingw-w64 tends to define it as 0x0502 in its headers.
llvm-svn: 125171
2011-02-09 04:18:30 +00:00
NAKAMURA Takumi 28242e8ff6 Windows/Program.inc: Eliminate the declaration of SetInformationJobObject(). It should be provided with _WIN32_WINNT>=0x0500.
llvm-svn: 125170
2011-02-09 04:18:21 +00:00
NAKAMURA Takumi 684ef5e7bd Windows/DynamicLibrary.inc: ELM_Callback fix for mingw-w64.
llvm-svn: 125169
2011-02-09 04:18:12 +00:00
NAKAMURA Takumi cbf582921e llvm-lit may be available with CMake.
llvm-svn: 125168
2011-02-09 04:18:02 +00:00
NAKAMURA Takumi bf0b3ae86b llvm-lit may be able to invoke clang tests.
llvm-svn: 125167
2011-02-09 04:17:54 +00:00
NAKAMURA Takumi cec7e6828e tools/llvm-ld/CMakeLists.txt: llvm-ld depends on llvm-stub at runtime.
llvm-svn: 125166
2011-02-09 04:17:47 +00:00
NAKAMURA Takumi db06756c9c tools/llvm-ld: Cygwin can handle #!shbang.
llvm-svn: 125165
2011-02-09 04:17:39 +00:00
Devang Patel 19ba2b4d6e Emit debug info for objc_selector.
llvm-svn: 125163
2011-02-09 03:15:05 +00:00
Greg Clayton 9f5abd8e44 Fix comment text.
llvm-svn: 125162
2011-02-09 03:12:09 +00:00
Greg Clayton 0d0c12ab61 <rdar://problem/8972204> Test failure: ./dotest.py -v -t -f UniversalTestCase.test_process_launch_for_universal
Fix for bad architecture settings that were being used from the qHostInfo.

llvm-svn: 125161
2011-02-09 03:09:55 +00:00
Ken Dyck 48b0b2f762 Correct units in comments describing Size and getSize().
llvm-svn: 125158
2011-02-09 02:06:44 +00:00
Douglas Gregor 2575631c0f When IRgen refers to a function declaration that is not a definition,
and we later find the definition, make sure that we add the definition
(not the declaration) to the list of deferred definitions to
emit. Fixes PR8864.

Thanks to Nick Lewycky for testing this	patch out

llvm-svn: 125157
2011-02-09 02:03:05 +00:00
Ken Dyck c8ae55050d Convert RecordLayout::Size to CharUnits from bits. No changes to
functionality intended.

llvm-svn: 125156
2011-02-09 01:59:34 +00:00
Ted Kremenek a40f8ebc83 static analyzer: Further reduce the analyzer's memory usage when analyzing sqlite3 by 7-10% by recylcing "uninteresting" ExplodedNodes.
The optimization involves eagerly pruning ExplodedNodes from the ExplodedGraph that contain
practically no difference between the predecessor and successor nodes.  For example, if
the state is different between a predecessor and a node, the node is left in.  Only for
the 'environment' component of the state do we not care if the ExplodedNodes are different.
This paves the way for future optimizations where we can reclaim the environment objects.

llvm-svn: 125154
2011-02-09 01:27:33 +00:00
Ted Kremenek a628225535 Make ProgramPoint::getTag() public.
llvm-svn: 125153
2011-02-09 01:27:27 +00:00
Greg Clayton 925137cf84 Pull support for the shared and exclusive lock since this wasn't available
on linux. And conditionalize the availablility of the fcntl() command 
F_GETPATH.

llvm-svn: 125152
2011-02-09 01:16:43 +00:00
Jakob Stoklund Olesen 1305bc0a65 Evict a lighter single interference before attempting to split a live range.
Registers are not allocated strictly in spill weight order when live range
splitting and spilling has created new shorter intervals with higher spill
weights.

When one of the new heavy intervals conflicts with a single lighter interval,
simply evict the old interval instead of trying to split the heavy one.

The lighter interval is a better candidate for splitting, it has a smaller use
density.

llvm-svn: 125151
2011-02-09 01:14:03 +00:00
John McCall f4cd4f94d9 NonTypeTemplateParmDecl is just a DeclaratorDecl, not a VarDecl.
Also, reorganize and make very explicit the logic for determining
the value kind and type of a referenced declaration.

llvm-svn: 125150
2011-02-09 01:13:10 +00:00
Greg Clayton 51b1e2d271 Use Host::File in lldb_private::StreamFile and other places to cleanup host
layer a bit more.

llvm-svn: 125149
2011-02-09 01:08:52 +00:00
Johnny Chen 7eaacc517b Add some helper methods to the EmulateInstructionARM class as a first step in the
refactorings of EmulateInstructionARM.cpp file, which will be modified later to
take advantage of these helper methods.

llvm-svn: 125148
2011-02-09 01:00:31 +00:00
Devang Patel d3a7ee6bfc Test case for r125142.
llvm-svn: 125144
2011-02-09 00:37:52 +00:00
Devang Patel 14524e0f24 If an aggregate argument is passed indirectly because it has non trivial
destructor or copy constructor than let debug info know about it.

Radar 8945514.

llvm-svn: 125142
2011-02-09 00:37:30 +00:00
Jakob Stoklund Olesen 0b2f8d24b3 Set an allocation hint when rematting before a COPY.
This almost guarantees that the COPY will be coalesced.

llvm-svn: 125140
2011-02-09 00:25:36 +00:00
Caroline Tice 123b89b67f Add code to emulate the LDMIB Arm instruction.
Modify code for LDM and LDMDB instructions to only
create one context and to reuse it, rather than 
creating multiple contexts.

llvm-svn: 125139
2011-02-08 23:56:10 +00:00
Johnny Chen 108a363318 Fix typos.
llvm-svn: 125138
2011-02-08 23:49:37 +00:00
Jakob Stoklund Olesen 5a9683b319 Fix one more case of splitting after the last split point.
llvm-svn: 125137
2011-02-08 23:26:48 +00:00