Commit Graph

26 Commits

Author SHA1 Message Date
Joey Gouly 51f6fb9a18 Delete the functions F1 and F2 to appease the valgrind bot.
llvm-svn: 179239
2013-04-10 23:21:26 +00:00
Joey Gouly 81259294be Change CloneFunctionInto to always clone Argument attributes induvidually,
rather than checking if the source and destination have the same number of
arguments and copying the attributes over directly.

llvm-svn: 179169
2013-04-10 10:37:38 +00:00
Chandler Carruth 9fb823bbd4 Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

llvm-svn: 171366
2013-01-02 11:36:10 +00:00
Chandler Carruth 130cec21b9 Sort the #include lines for unittest/...
llvm-svn: 169250
2012-12-04 10:23:08 +00:00
Benjamin Kramer 576f5a10e6 Remove unneeded and invalid SetInsertPoint calls from unittest.
BB->end() returns a sentinel value that is not a legal insert point.

llvm-svn: 164699
2012-09-26 15:16:05 +00:00
Michael Ilseman a398d4cfaf Expansions for u/srem, using the udiv expansion. More unit tests for udiv and u/srem.
Fixed issue with Release build.

llvm-svn: 164654
2012-09-26 01:55:01 +00:00
Chad Rosier 88387f5332 Revert r164614 to appease the buildbots.
llvm-svn: 164627
2012-09-25 19:57:20 +00:00
Michael Ilseman 506150a071 Expansions for u/srem, using the udiv expansion. More unit tests for udiv and u/srem.
llvm-svn: 164614
2012-09-25 17:56:47 +00:00
Michael Ilseman 02a6babb3e Unit tests for IntegerDivision. Currently, just a basic sanity check to ensure that the code was generated properly. Future work would be finding some way to test the actual result that would be computed.
llvm-svn: 164582
2012-09-25 01:33:33 +00:00
Chandler Carruth aafe0918bc Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h
This was always part of the VMCore library out of necessity -- it deals
entirely in the IR. The .cpp file in fact was already part of the VMCore
library. This is just a mechanical move.

I've tried to go through and re-apply the coding standard's preferred
header sort, but at 40-ish files, I may have gotten some wrong. Please
let me know if so.

I'll be committing the corresponding updates to Clang and Polly, and
Duncan has DragonEgg.

Thanks to Bill and Eric for giving the green light for this bit of cleanup.

llvm-svn: 159421
2012-06-29 12:38:19 +00:00
NAKAMURA Takumi 6fed668d25 llvm/unittests: Simplify LINK_COMPONENTS.
llvm-svn: 158942
2012-06-21 22:17:51 +00:00
Chandler Carruth 94d0251824 Completely refactor the structuring of unittest CMake files to match the
Makefiles, the CMake files in every other part of the LLVM tree, and
sanity.

This should also restore the output tree structure of all the unit
tests, sorry for breaking that, and thanks for letting me know.

The fundamental change is to put a CMakeLists.txt file in the unittest
directory, with a single test binary produced from it. This has several
advantages:

- No more weird directory stripping in the unittest macro, allowing it
  to be used more readily in other projects.
- No more directory prefixes on all the source files.
- Allows correct and precise use of LLVM's per-directory dependency
  system.
- Allows use of the checking logic for source files that have not been
  added to the CMake build. This uncovered a file being skipped with
  CMake in LLVM and one in Clang's unit tests.
- Makes Specifying conditional compilation or other custom logic for JIT
  tests easier.

It did require adding the concept of an explicit 'optional' source file
to the CMake build so that the missing-file check can skip cases where
the file is *supposed* to be missing. =]

This is another chunk of refactoring the CMake build in order to make it
usable for other clients like CompilerRT / ASan / TSan.

Note that this is interdependent with a Clang CMake change.

llvm-svn: 158909
2012-06-21 09:51:26 +00:00
Chandler Carruth 35e6706675 Fix inappropriate use of anonymous namespaces in unittests.
The TEST_F macros actually declare *subclasses* of the test fixtures.
Even if they didn't we don't want them to declare external functions.
The entire unit test, including both the fixture class and the fixture
test cases should be wrapped in the anonymous namespace.

This issue was caught by the new '-Winternal-linkage-in-inline' warning.

llvm-svn: 158798
2012-06-20 08:39:27 +00:00
David Blaikie a379b18173 Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146960
2011-12-20 02:50:00 +00:00
Jay Foad d1b7849d49 Convert GetElementPtrInst to use ArrayRef.
llvm-svn: 135904
2011-07-25 09:48:08 +00:00
Jay Foad 7c14a558fe Don't include Operator.h from InstrTypes.h.
llvm-svn: 129271
2011-04-11 09:35:34 +00:00
Jay Foad 52131344a2 Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

llvm-svn: 128537
2011-03-30 11:28:46 +00:00
Jay Foad e0938d8a87 (Almost) always call reserveOperandSpace() on newly created PHINodes.
llvm-svn: 128535
2011-03-30 11:19:20 +00:00
Duncan Sands 6dcd49bc2b Simplify RecursivelyDeleteDeadPHINode. The only functionality change
should be that if the phi is used by a side-effect free instruction with
no uses then the phi and the instruction now get zapped (checked by the
unittest).

llvm-svn: 126124
2011-02-21 16:27:36 +00:00
Nick Lewycky 183c24c51b Make RecursivelyDeleteDeadPHINode delete a phi node that has no users and add a
test for that. With this change, test/CodeGen/X86/codegen-dce.ll no longer finds
any instructions to DCE, so delete the test.

Also renamed J and JP to I and IP in RecursivelyDeleteDeadPHINode.

llvm-svn: 126088
2011-02-20 18:05:56 +00:00
Nick Lewycky c8a1569950 Teach RecursivelyDeleteDeadPHINodes to handle multiple self-references. Patch
by Andrew Clinton!

llvm-svn: 126077
2011-02-20 08:38:20 +00:00
Nick Lewycky 84189ab22b Teach this test not to leak. Also, clean up all the cast<BinaryOperator> cruft.
llvm-svn: 98446
2010-03-13 19:58:26 +00:00
Devang Patel 11cf3f4a27 Factor out redundancy from clone() implementations.
llvm-svn: 85327
2009-10-27 22:16:29 +00:00
Chris Lattner 26a7ae4fba Type.h doesn't need to #include LLVMContext.h
llvm-svn: 85254
2009-10-27 17:08:31 +00:00
Duncan Sands 9ed7b16bf3 Introduce and use convenience methods for getting pointer types
where the element is of a basic builtin type.  For example, to get
an i8* use getInt8PtrTy.

llvm-svn: 83379
2009-10-06 15:40:36 +00:00
Nick Lewycky 1f71578e0d New unit test for the cloning module, which so far only covers cloning of
instructions' optimization flags.

llvm-svn: 82934
2009-09-27 21:39:46 +00:00