Commit Graph

16 Commits

Author SHA1 Message Date
Simon Pilgrim e4991867fb [clang-fuzzer] CreateAndRunJITFunc - fix use after move static analyzer warning.
We were using the unique_ptr M to determine the triple after it had been moved in the EngineBuilder constructor.
2020-10-26 12:24:18 +00:00
jasonliu f85bcc21dd [AIX] Turn -fdata-sections on by default in Clang
Summary:

This patch does the following:
1. Make InitTargetOptionsFromCodeGenFlags() accepts Triple as a
 parameter, because some options' default value is triple dependant.
2. DataSections is turned on by default on AIX for llc.
3. Test cases change accordingly because of the default behaviour change.
4. Clang Driver passes in -fdata-sections by default on AIX.

Reviewed By: MaskRay, DiggerLin

Differential Revision: https://reviews.llvm.org/D88737
2020-10-14 15:58:31 +00:00
Michele Scandale 53880b8cb9 [CMake] Make `intrinsics_gen` dependency unconditional.
The `intrinsics_gen` target exists in the CMake exports since r309389
(see LLVMConfig.cmake.in), hence projects can depend on `intrinsics_gen`
even it they are built separately from LLVM.

Reviewed By: MaskRay, JDevlieghere

Differential Revision: https://reviews.llvm.org/D83454
2020-07-17 16:43:17 -07:00
serge-sans-paille ac1d23ed7d Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime registration
MCTargetOptionsCommandFlags.inc and CommandFlags.inc are headers which contain
cl::opt with static storage.
These headers are meant to be incuded by tools to make it easier to parametrize
codegen/mc.

However, these headers are also included in at least two libraries: lldCommon
and handle-llvm. As a result, when creating DYLIB, clang-cpp holds a reference
to the options, and lldCommon holds another reference. Linking the two in a
single executable, as zig does[0], results in a double registration.

This patch explores an other approach: the .inc files are moved to regular
files, and the registration happens on-demand through static declaration of
options in the constructor of a static object.

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1756977#c5

Differential Revision: https://reviews.llvm.org/D75579
2020-03-17 14:01:30 +01:00
Jonas Devlieghere 2b3d49b610 [Clang] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.

Differential revision: https://reviews.llvm.org/D66259

llvm-svn: 368942
2019-08-14 23:04:18 +00:00
Lang Hames 853813293a [clang-fuzzer] Remove 'setUseOrcMCJITReplacement(false)' call.
The default value for this option (UseMCJITReplacement) is already false, and
OrcMCJITReplacement is going to have deprecation warnings attached in LLVM 9.0.
Removing this call removes a spurious warning.

llvm-svn: 366141
2019-07-15 22:27:57 +00:00
Chandler Carruth 2946cd7010 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636
2019-01-19 08:50:56 +00:00
Emmett Neyman a60d168d22 Added another optimization pass to make vectorizing possible
Summary: I noticed that my code wasn't going deep into the loop vectorizer code so added another pass that makes it go further.

Reviewers: morehouse, kcc

Reviewed By: morehouse

Subscribers: cfe-commits, llvm-commits

Differential Revision: https://reviews.llvm.org/D50482

llvm-svn: 339305
2018-08-09 00:58:23 +00:00
Matt Morehouse b1218ec8ea [clang-fuzzer] Remove unused typedef.
llvm-svn: 338946
2018-08-04 01:42:47 +00:00
Emmett Neyman 2655b0383c LLVM Proto Fuzzer - Run Functions on Suite of Inputs
Summary:
Added corpus of arrays to use as inputs for the functions. Check that the two
functions modify the inputted arrays in the same way.

Reviewers: kcc, morehouse

Reviewed By: morehouse

Subscribers: mgorny, cfe-commits, llvm-commits

Differential Revision: https://reviews.llvm.org/D50194

llvm-svn: 338943
2018-08-04 01:18:37 +00:00
Andrei Elovikov ad56ebaf06 [NFC] Silence warning about ptr-to-func to ptr-to-obj cast in clang-fuzzer/handle-llvm/handle_llvm.cpp.
Summary:
I don't have the whole list of GCC binaries available so I determined the exact
version where the warning disappeared via:

https://github.com/gcc-mirror/gcc/blob/gcc-4_9_0-release/gcc/cp/typeck.c#L6863
https://github.com/gcc-mirror/gcc/blob/gcc-4_8_5-release/gcc/cp/typeck.c#L6652

Reviewers: emmettneyman, erichkeane

Reviewed By: emmettneyman, erichkeane

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D50056

llvm-svn: 338551
2018-08-01 13:34:18 +00:00
Emmett Neyman be97297545 added shared library to fix buildbot
Summary: added shared library to fix buildbot

Subscribers: mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D49895

llvm-svn: 338091
2018-07-27 00:43:26 +00:00
Emmett Neyman e5581242a0 Updated llvm-proto-fuzzer to execute the compiled code
Summary:
Made changes to the llvm-proto-fuzzer
- Added loop vectorizer optimization pass in order to have two IR versions
- Updated old fuzz target to handle two different IR versions
- Wrote code to execute both versions in memory

Reviewers: morehouse, kcc, alexshap

Reviewed By: morehouse

Subscribers: pcc, mgorny, cfe-commits, llvm-commits

Differential Revision: https://reviews.llvm.org/D49526

llvm-svn: 338077
2018-07-26 22:23:25 +00:00
Reid Kleckner e7a7a5057b Attempt to fix latent tablegen dependency issue
llvm-svn: 335419
2018-06-23 17:32:51 +00:00
Sam Clegg 5421b37893 Fix BUILD_SHARED_LIBS=1 build of libclangHandleLLVM
Differential Revision: https://reviews.llvm.org/D48503

llvm-svn: 335380
2018-06-22 19:44:48 +00:00
Emmett Neyman e5f4a9ff76 Implemented proto to LLVM conversion and LLVM fuzz target
Differential Revision: https://reviews.llvm.org/D48106

llvm-svn: 335374
2018-06-22 18:05:00 +00:00