r314926 - [Hexagon] Move getHexagonTargetFeatures to Hexagon.cpp (NFC)
Author: sgundapa Date: Wed Oct 4 12:09:29 2017 New Revision: 314926 URL: http://llvm.org/viewvc/llvm-project?rev=314926&view=rev Log: [Hexagon] Move getHexagonTargetFeatures to Hexagon.cpp (NFC) Differential Revision: https://reviews.llvm.org/D38548 Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp cfe/trunk/lib/Driver/ToolChains/Hexagon.h Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=314926&r1=314925&r2=314926&view=diff == --- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Wed Oct 4 12:09:29 2017 @@ -273,21 +273,6 @@ static void ParseMRecip(const Driver &D, OutStrings.push_back(Args.MakeArgString(Out)); } -static void getHexagonTargetFeatures(const ArgList &Args, - std::vector &Features) { - handleTargetFeaturesGroup(Args, Features, -options::OPT_m_hexagon_Features_Group); - - bool UseLongCalls = false; - if (Arg *A = Args.getLastArg(options::OPT_mlong_calls, - options::OPT_mno_long_calls)) { -if (A->getOption().matches(options::OPT_mlong_calls)) - UseLongCalls = true; - } - - Features.push_back(UseLongCalls ? "+long-calls" : "-long-calls"); -} - static void getWebAssemblyTargetFeatures(const ArgList &Args, std::vector &Features) { handleTargetFeaturesGroup(Args, Features, options::OPT_m_wasm_Features_Group); @@ -349,7 +334,7 @@ static void getTargetFeatures(const Tool x86::getX86TargetFeatures(D, Triple, Args, Features); break; case llvm::Triple::hexagon: -getHexagonTargetFeatures(Args, Features); +hexagon::getHexagonTargetFeatures(Args, Features); break; case llvm::Triple::wasm32: case llvm::Triple::wasm64: Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp?rev=314926&r1=314925&r2=314926&view=diff == --- cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp Wed Oct 4 12:09:29 2017 @@ -27,6 +27,22 @@ using namespace clang::driver::toolchain using namespace clang; using namespace llvm::opt; +// Hexagon target features. +void hexagon::getHexagonTargetFeatures(const ArgList &Args, + std::vector &Features) { + handleTargetFeaturesGroup(Args, Features, +options::OPT_m_hexagon_Features_Group); + + bool UseLongCalls = false; + if (Arg *A = Args.getLastArg(options::OPT_mlong_calls, + options::OPT_mno_long_calls)) { +if (A->getOption().matches(options::OPT_mlong_calls)) + UseLongCalls = true; + } + + Features.push_back(UseLongCalls ? "+long-calls" : "-long-calls"); +} + // Hexagon tools start. void hexagon::Assembler::RenderExtraToolArgs(const JobAction &JA, ArgStringList &CmdArgs) const { Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Hexagon.h?rev=314926&r1=314925&r2=314926&view=diff == --- cfe/trunk/lib/Driver/ToolChains/Hexagon.h (original) +++ cfe/trunk/lib/Driver/ToolChains/Hexagon.h Wed Oct 4 12:09:29 2017 @@ -50,6 +50,10 @@ public: const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override; }; + +void getHexagonTargetFeatures(const llvm::opt::ArgList &Args, + std::vector &Features); + } // end namespace hexagon. } // end namespace tools ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r316102 - [Hexagon] Handling of new HVX flags and target-features
Author: sgundapa Date: Wed Oct 18 11:10:13 2017 New Revision: 316102 URL: http://llvm.org/viewvc/llvm-project?rev=316102&view=rev Log: [Hexagon] Handling of new HVX flags and target-features This patch has the following changes A new flag "-mhvx-length={64B|128B}" is introduced to specify the length of the vector. Previously we have used "-mhvx-double" for 128 Bytes. This adds the target-feature "+hvx-length{64|128}b" The "-mhvx" flag must be provided on command line to enable HVX for Hexagon. If no -mhvx-length flag is specified, a default length is picked from the arch mentioned in this priority order from either -mhvx=vxx or -mcpu. For v60 and v62 the default length is 64 Byte. For unknown versions, the length is 128 Byte. The -mhvx flag adds the target-feature "+hvxv{hvx_version}" The 64 Byte mode is soon going to be deprecated. A warning is emitted if 64 Byte is enabled. A warning is still emitted for the default 64 Byte as well. This warning can be suppressed with a -Wno flag. The "-mhvx-double" and "-mno-hvx-double" flags are deprecated. A warning is emitted if the driver sees them on commandline. "-mhvx-double" is an alias to "-mhvx-length=128B" The compilation will error out if -mhvx-length is specified with out an -mhvx/-mhvx= flag The macro HVX_LENGTH is defined and is set to the length of the vector. Eg: #define HVX_LENGTH 64 The macro HVX_ARCH is defined and is set to the version of the HVX. Eg: #define HVX_ARCH 62 Differential Revision: https://reviews.llvm.org/D38852 Added: cfe/trunk/test/Driver/hexagon-hvx.c Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td cfe/trunk/include/clang/Driver/Options.td cfe/trunk/lib/Basic/Targets/Hexagon.cpp cfe/trunk/lib/Basic/Targets/Hexagon.h cfe/trunk/lib/Driver/ToolChains/Clang.cpp cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp cfe/trunk/lib/Driver/ToolChains/Hexagon.h cfe/trunk/test/CodeGen/hexagon-inline-asm.c cfe/trunk/test/Preprocessor/hexagon-predefines.c Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=316102&r1=316101&r2=316102&view=diff == --- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original) +++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Wed Oct 18 11:10:13 2017 @@ -263,6 +263,9 @@ def err_analyzer_config_no_value : Error def err_analyzer_config_multiple_values : Error< "analyzer-config option '%0' should contain only one '='">; +def err_drv_invalid_hvx_length : Error< + "-mhvx-length is not supported without a -mhvx/-mhvx= flag">; + def err_drv_modules_validate_once_requires_timestamp : Error< "option '-fmodules-validate-once-per-build-session' requires " "'-fbuild-session-timestamp=' or '-fbuild-session-file='">; Modified: cfe/trunk/include/clang/Driver/Options.td URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=316102&r1=316101&r2=316102&view=diff == --- cfe/trunk/include/clang/Driver/Options.td (original) +++ cfe/trunk/include/clang/Driver/Options.td Wed Oct 18 11:10:13 2017 @@ -139,6 +139,10 @@ def m_arm_Features_Group : OptionGroup<" Group, DocName<"ARM">; def m_hexagon_Features_Group : OptionGroup<"">, Group, DocName<"Hexagon">; +// The features added by this group will not be added to target features. +// These are explicitly handled. +def m_hexagon_Features_HVX_Group : OptionGroup<"">, + Group, DocName<"Hexagon">; def m_ppc_Features_Group : OptionGroup<"">, Group, DocName<"PowerPC">; def m_wasm_Features_Group : OptionGroup<"">, @@ -2495,14 +2499,26 @@ def mv60 : Flag<["-"], "mv60">, Group, AliasArgs<["hexagonv60"]>; def mv62 : Flag<["-"], "mv62">, Group, Alias, AliasArgs<["hexagonv62"]>; -def mhexagon_hvx : Flag<["-"], "mhvx">, Group, -Flags<[CC1Option]>, HelpText<"Enable Hexagon Vector eXtensions">; -def mno_hexagon_hvx : Flag<["-"], "mno-hvx">, Group, -Flags<[CC1Option]>, HelpText<"Disable Hexagon Vector eXtensions">; -def mhexagon_hvx_double : Flag<["-"], "mhvx-double">, Group, -Flags<[CC1Option]>, HelpText<"Enable Hexagon Double Vector eXtensions">; -def mno_hexagon_hvx_double : Flag<["-"], "mno-hvx-double">, Group, -Flags<[CC1Option]>, HelpText<"Disable Hexagon Double Vector eXtensions">; +def mhexagon_hvx : Flag<[ "-" ], "mhvx">, + Group, + HelpText<"Enable Hexagon Vector eXtensions">; +def mhexagon_hvx_EQ : Joined<[ "-" ], "mhvx=">, + Group, + HelpText<"Enable Hexagon Vector eXtensions">; +def mno_hexagon_hvx : Flag<[ "-" ], "mno-hvx">, + Group, +
[clang] [llvm] [Hexagon] Add Loop Alignment pass. (PR #83379)
https://github.com/sgundapa updated https://github.com/llvm/llvm-project/pull/83379 >From 973d204ae0d8370704f1613e5206ac330a40e8f4 Mon Sep 17 00:00:00 2001 From: Sumanth Gundapaneni Date: Wed, 28 Feb 2024 12:23:35 -0800 Subject: [PATCH] [Hexagon] Add Loop Alignment pass. Inspect a basic block and if its single basic block loop with a small number of instructions, set the Loop Alignment to 32 bytes. This will avoid the cache line break in the first packet of loop which will cause a stall per each execution of loop. --- clang/test/CodeGen/builtins-hexagon.c | 2 +- llvm/lib/Target/Hexagon/CMakeLists.txt| 1 + llvm/lib/Target/Hexagon/HexagonLoopAlign.cpp | 216 ++ .../Target/Hexagon/HexagonTargetMachine.cpp | 9 +- .../lib/Target/Hexagon/HexagonTargetMachine.h | 1 + llvm/test/CodeGen/Hexagon/loop-balign.ll | 91 llvm/test/CodeGen/Hexagon/loop_align_count.ll | 115 ++ .../test/CodeGen/Hexagon/loop_align_count.mir | 130 +++ llvm/test/CodeGen/Hexagon/v6-haar-balign32.ll | 117 ++ 9 files changed, 680 insertions(+), 2 deletions(-) create mode 100644 llvm/lib/Target/Hexagon/HexagonLoopAlign.cpp create mode 100644 llvm/test/CodeGen/Hexagon/loop-balign.ll create mode 100644 llvm/test/CodeGen/Hexagon/loop_align_count.ll create mode 100644 llvm/test/CodeGen/Hexagon/loop_align_count.mir create mode 100644 llvm/test/CodeGen/Hexagon/v6-haar-balign32.ll diff --git a/clang/test/CodeGen/builtins-hexagon.c b/clang/test/CodeGen/builtins-hexagon.c index 9a1b733da5cdb8..52073f27ae70f5 100644 --- a/clang/test/CodeGen/builtins-hexagon.c +++ b/clang/test/CodeGen/builtins-hexagon.c @@ -1,5 +1,5 @@ // REQUIRES: hexagon-registered-target -// RUN: %clang_cc1 -triple hexagon-unknown-elf -target-cpu hexagonv65 -target-feature +hvxv65 -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple hexagon-unknown-elf -target-cpu hexagonv65 -target-feature +hvxv65 -target-feature +hvx-length128b -emit-llvm %s -o - | FileCheck %s void test() { int v64 __attribute__((__vector_size__(64))); diff --git a/llvm/lib/Target/Hexagon/CMakeLists.txt b/llvm/lib/Target/Hexagon/CMakeLists.txt index a22a5c11e6ab3a..cdc062eee72b1e 100644 --- a/llvm/lib/Target/Hexagon/CMakeLists.txt +++ b/llvm/lib/Target/Hexagon/CMakeLists.txt @@ -43,6 +43,7 @@ add_llvm_target(HexagonCodeGen HexagonISelDAGToDAGHVX.cpp HexagonISelLowering.cpp HexagonISelLoweringHVX.cpp + HexagonLoopAlign.cpp HexagonLoopIdiomRecognition.cpp HexagonMachineFunctionInfo.cpp HexagonMachineScheduler.cpp diff --git a/llvm/lib/Target/Hexagon/HexagonLoopAlign.cpp b/llvm/lib/Target/Hexagon/HexagonLoopAlign.cpp new file mode 100644 index 00..c79b528ff2f3f9 --- /dev/null +++ b/llvm/lib/Target/Hexagon/HexagonLoopAlign.cpp @@ -0,0 +1,216 @@ +//===- HexagonLoopAlign.cpp - Generate loop alignment directives -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===--===// +// Inspect a basic block and if its single basic block loop with a small +// number of instructions, set the prefLoopAlignment to 32 bytes (5). +//===--===// + +#define DEBUG_TYPE "hexagon-loop-align" + +#include "HexagonTargetMachine.h" +#include "llvm/CodeGen/MachineBlockFrequencyInfo.h" +#include "llvm/CodeGen/MachineBranchProbabilityInfo.h" +#include "llvm/CodeGen/SchedulerRegistry.h" +#include "llvm/Support/Debug.h" + +using namespace llvm; + +static cl::opt +DisableLoopAlign("disable-hexagon-loop-align", cl::Hidden, + cl::desc("Disable Hexagon loop alignment pass")); + +static cl::opt HVXLoopAlignLimitUB( +"hexagon-hvx-loop-align-limit-ub", cl::Hidden, cl::init(16), +cl::desc("Set hexagon hvx loop upper bound align limit")); + +static cl::opt TinyLoopAlignLimitUB( +"hexagon-tiny-loop-align-limit-ub", cl::Hidden, cl::init(16), +cl::desc("Set hexagon tiny-core loop upper bound align limit")); + +static cl::opt +LoopAlignLimitUB("hexagon-loop-align-limit-ub", cl::Hidden, cl::init(8), + cl::desc("Set hexagon loop upper bound align limit")); + +static cl::opt +LoopAlignLimitLB("hexagon-loop-align-limit-lb", cl::Hidden, cl::init(4), + cl::desc("Set hexagon loop lower bound align limit")); + +static cl::opt +LoopBndlAlignLimit("hexagon-loop-bundle-align-limit", cl::Hidden, + cl::init(4), + cl::desc("Set hexagon loop align bundle limit")); + +static cl::opt TinyLoopBndlAlignLimit( +"hexagon-tiny-loop-bundle-align-limit", cl::Hidden, cl::init(8), +cl::desc("Set hexagon tiny-core loop align bundle limit")); + +static cl::opt +LoopEdgeThreshold("hexagon
[clang] [llvm] [Hexagon] Add Loop Alignment pass. (PR #83379)
https://github.com/sgundapa closed https://github.com/llvm/llvm-project/pull/83379 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 9fcf4f3 - [Hexagon] Fix clang driver to parse -mcpu/-mvXX and -march properly.
Author: Sumanth Gundapaneni Date: 2019-11-14T12:59:15-06:00 New Revision: 9fcf4f372c7e08b7ee64a202cc09860a17da8152 URL: https://github.com/llvm/llvm-project/commit/9fcf4f372c7e08b7ee64a202cc09860a17da8152 DIFF: https://github.com/llvm/llvm-project/commit/9fcf4f372c7e08b7ee64a202cc09860a17da8152.diff LOG: [Hexagon] Fix clang driver to parse -mcpu/-mvXX and -march properly. Before this patch if we pass "-mcpu=hexagonv65 -march=hexagon" in this order, the driver fails to figure out the correct cpu version. This patch fixed this issue. Added: Modified: clang/lib/Driver/ToolChains/Hexagon.cpp clang/test/Driver/hexagon-toolchain-elf.c Removed: diff --git a/clang/lib/Driver/ToolChains/Hexagon.cpp b/clang/lib/Driver/ToolChains/Hexagon.cpp index 96cc084e2821..4a735a2a1d59 100644 --- a/clang/lib/Driver/ToolChains/Hexagon.cpp +++ b/clang/lib/Driver/ToolChains/Hexagon.cpp @@ -574,7 +574,7 @@ const StringRef HexagonToolChain::GetDefaultCPU() { const StringRef HexagonToolChain::GetTargetCPUVersion(const ArgList &Args) { Arg *CpuArg = nullptr; - if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ, options::OPT_march_EQ)) + if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) CpuArg = A; StringRef CPU = CpuArg ? CpuArg->getValue() : GetDefaultCPU(); diff --git a/clang/test/Driver/hexagon-toolchain-elf.c b/clang/test/Driver/hexagon-toolchain-elf.c index a7eeca0fdb12..237242e7cbf1 100644 --- a/clang/test/Driver/hexagon-toolchain-elf.c +++ b/clang/test/Driver/hexagon-toolchain-elf.c @@ -121,6 +121,19 @@ // CHECK028-NOT: "-ffp-contract=fast" // CHECK028: {{hexagon-link|ld}} +// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ +// RUN: -mcpu=hexagonv65 -march=hexagon\ +// RUN: %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK029 %s +// RUN: %clang -### -target hexagon-unknown-elf \ +// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ +// RUN: -mv65 -march=hexagon\ +// RUN: %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK029 %s +// CHECK029: "-cc1" {{.*}} "-target-cpu" "hexagonv65" +// CHECK029: hexagon-link{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v65/crt0 + // - // Test Linker related args // - ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r292496 - [Hexagon] Linux linker does not support .gnu-hash
Author: sgundapa Date: Thu Jan 19 10:54:04 2017 New Revision: 292496 URL: http://llvm.org/viewvc/llvm-project?rev=292496&view=rev Log: [Hexagon] Linux linker does not support .gnu-hash Hexagon Linux dynamic loader does not use (in fact does not support) .gnu-hash Differential Revision: https://reviews.llvm.org/D28865 Modified: cfe/trunk/lib/Driver/ToolChains.cpp cfe/trunk/test/Driver/linux-ld.c Modified: cfe/trunk/lib/Driver/ToolChains.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=292496&r1=292495&r2=292496&view=diff == --- cfe/trunk/lib/Driver/ToolChains.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Jan 19 10:54:04 2017 @@ -4122,6 +4122,7 @@ Linux::Linux(const Driver &D, const llvm const bool IsAndroid = Triple.isAndroid(); const bool IsMips = isMipsArch(Arch); + const bool IsHexagon = Arch == llvm::Triple::hexagon; if (IsMips && !SysRoot.empty()) ExtraOpts.push_back("--sysroot=" + SysRoot); @@ -4131,7 +4132,8 @@ Linux::Linux(const Driver &D, const llvm // .gnu.hash needs symbols to be grouped by hash code whereas the MIPS // ABI requires a mapping between the GOT and the symbol table. // Android loader does not support .gnu.hash. - if (!IsMips && !IsAndroid) { + // Hexagon linker/loader does not support .gnu.hash + if (!IsMips && !IsAndroid && !IsHexagon) { if (Distro.IsRedhat() || Distro.IsOpenSUSE() || (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick)) ExtraOpts.push_back("--hash-style=gnu"); Modified: cfe/trunk/test/Driver/linux-ld.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/linux-ld.c?rev=292496&r1=292495&r2=292496&view=diff == --- cfe/trunk/test/Driver/linux-ld.c (original) +++ cfe/trunk/test/Driver/linux-ld.c Thu Jan 19 10:54:04 2017 @@ -705,6 +705,14 @@ // CHECK-PPC64LE-ELFv2: "-m" "elf64lppc" // CHECK-PPC64LE-ELFv2: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld64.so.2" // +// Check that we do not pass --hash-style=gnu or --hash-style=both to +// hexagon linux linker +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=hexagon-linux-gnu \ +// RUN: | FileCheck --check-prefix=CHECK-HEXAGON %s +// CHECK-HEXAGON: "{{.*}}hexagon-link{{(.exe)?}}" +// CHECK-HEXAGON-NOT: "--hash-style={{gnu|both}}" +// // Check that we do not pass --hash-style=gnu and --hash-style=both to linker // and provide correct path to the dynamic linker and emulation mode when build // for MIPS platforms. ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r286842 - Fix the unit test darwin-multiarch-arm.c for windows
Author: sgundapa Date: Mon Nov 14 11:09:39 2016 New Revision: 286842 URL: http://llvm.org/viewvc/llvm-project?rev=286842&view=rev Log: Fix the unit test darwin-multiarch-arm.c for windows Modified: cfe/trunk/test/Driver/darwin-multiarch-arm.c Modified: cfe/trunk/test/Driver/darwin-multiarch-arm.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-multiarch-arm.c?rev=286842&r1=286841&r2=286842&view=diff == --- cfe/trunk/test/Driver/darwin-multiarch-arm.c (original) +++ cfe/trunk/test/Driver/darwin-multiarch-arm.c Mon Nov 14 11:09:39 2016 @@ -9,6 +9,6 @@ // CHECK:"-cc1" "-triple" "thumbv7s-apple-ios5.0.0" // CHECK-SAME: "-o" "[[CC_OUT2:[^"]*]]" // CHECK:ld{{(\.exe)?}}" {{.*}} "-o" "[[LD_OUT2:[^"]*]]" {{.*}} "[[CC_OUT2]]" -// CHECK:lipo" +// CHECK:lipo{{(\.exe)?}}" // CHECK-DAG: "[[LD_OUT1]]" // CHECK-DAG: "[[LD_OUT2]]" ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D14887: Make tbm-builtins.c as X86 specific unit test
sgundapa created this revision. sgundapa added reviewers: echristo, craig.topper. sgundapa added a subscriber: cfe-commits. This unit test need not be true on all the targets. http://reviews.llvm.org/D14887 Files: test/CodeGen/tbm-builtins.c Index: test/CodeGen/tbm-builtins.c === --- test/CodeGen/tbm-builtins.c +++ test/CodeGen/tbm-builtins.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -O3 -triple=x86_64-unknown-unknown -target-feature +tbm -emit-llvm -o - | FileCheck %s +// REQUIRES: x86-registered-target // FIXME: The code generation checks for add/sub and/or are depending on the optimizer. // Don't include mm_malloc.h, it's system specific. Index: test/CodeGen/tbm-builtins.c === --- test/CodeGen/tbm-builtins.c +++ test/CodeGen/tbm-builtins.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -O3 -triple=x86_64-unknown-unknown -target-feature +tbm -emit-llvm -o - | FileCheck %s +// REQUIRES: x86-registered-target // FIXME: The code generation checks for add/sub and/or are depending on the optimizer. // Don't include mm_malloc.h, it's system specific. ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r253887 - Make tbm-builtins.c as X86 specific unit test
Author: sgundapa Date: Mon Nov 23 11:33:49 2015 New Revision: 253887 URL: http://llvm.org/viewvc/llvm-project?rev=253887&view=rev Log: Make tbm-builtins.c as X86 specific unit test Differential Revision: http://reviews.llvm.org/D14887 Modified: cfe/trunk/test/CodeGen/tbm-builtins.c Modified: cfe/trunk/test/CodeGen/tbm-builtins.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/tbm-builtins.c?rev=253887&r1=253886&r2=253887&view=diff == --- cfe/trunk/test/CodeGen/tbm-builtins.c (original) +++ cfe/trunk/test/CodeGen/tbm-builtins.c Mon Nov 23 11:33:49 2015 @@ -1,5 +1,7 @@ // RUN: %clang_cc1 %s -O3 -triple=x86_64-unknown-unknown -target-feature +tbm -emit-llvm -o - | FileCheck %s // FIXME: The code generation checks for add/sub and/or are depending on the optimizer. +// The REQUIRES keyword will be removed when the FIXME is complete. +// REQUIRES: x86-registered-target // Don't include mm_malloc.h, it's system specific. #define __MM_MALLOC_H ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D14887: Make tbm-builtins.c as X86 specific unit test
This revision was automatically updated to reflect the committed changes. Closed by commit rL253887: Make tbm-builtins.c as X86 specific unit test (authored by sgundapa). Changed prior to commit: http://reviews.llvm.org/D14887?vs=40824&id=40940#toc Repository: rL LLVM http://reviews.llvm.org/D14887 Files: cfe/trunk/test/CodeGen/tbm-builtins.c Index: cfe/trunk/test/CodeGen/tbm-builtins.c === --- cfe/trunk/test/CodeGen/tbm-builtins.c +++ cfe/trunk/test/CodeGen/tbm-builtins.c @@ -1,5 +1,7 @@ // RUN: %clang_cc1 %s -O3 -triple=x86_64-unknown-unknown -target-feature +tbm -emit-llvm -o - | FileCheck %s // FIXME: The code generation checks for add/sub and/or are depending on the optimizer. +// The REQUIRES keyword will be removed when the FIXME is complete. +// REQUIRES: x86-registered-target // Don't include mm_malloc.h, it's system specific. #define __MM_MALLOC_H Index: cfe/trunk/test/CodeGen/tbm-builtins.c === --- cfe/trunk/test/CodeGen/tbm-builtins.c +++ cfe/trunk/test/CodeGen/tbm-builtins.c @@ -1,5 +1,7 @@ // RUN: %clang_cc1 %s -O3 -triple=x86_64-unknown-unknown -target-feature +tbm -emit-llvm -o - | FileCheck %s // FIXME: The code generation checks for add/sub and/or are depending on the optimizer. +// The REQUIRES keyword will be removed when the FIXME is complete. +// REQUIRES: x86-registered-target // Don't include mm_malloc.h, it's system specific. #define __MM_MALLOC_H ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D14887: Make tbm-builtins.c as X86 specific unit test
sgundapa added a comment. Merged this as r253887 Repository: rL LLVM http://reviews.llvm.org/D14887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D15130: Fix the clang driver when "-nostdlib" is present
sgundapa created this revision. sgundapa added reviewers: vkalintiris, echristo. sgundapa added a subscriber: cfe-commits. This patch is a fix to r252901 which changed the behavior of clang driver. In the presence of "-nostdlib" none of the standard libraries should be passed to link line. http://reviews.llvm.org/D15130 Files: lib/Driver/Tools.cpp Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -8694,8 +8694,7 @@ if (!isAndroid) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o"))); } - } else if (Args.hasArg(options::OPT_rtlib_EQ)) -AddRunTimeLibs(ToolChain, D, CmdArgs, Args); + } C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); } Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -8694,8 +8694,7 @@ if (!isAndroid) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o"))); } - } else if (Args.hasArg(options::OPT_rtlib_EQ)) -AddRunTimeLibs(ToolChain, D, CmdArgs, Args); + } C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); } ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D15130: Fix the clang driver when "-nostdlib" is present
sgundapa updated this revision to Diff 41570. sgundapa added a comment. Added a few tests in this new patch set http://reviews.llvm.org/D15130 Files: lib/Driver/Tools.cpp test/Driver/nostdlib.c Index: test/Driver/nostdlib.c === --- test/Driver/nostdlib.c +++ test/Driver/nostdlib.c @@ -9,3 +9,19 @@ // RUN: %clang -### -nostartfiles -nostdlib -target i386-apple-darwin %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=ARGSCLAIMED // ARGSCLAIMED-NOT: warning: + +// In the presence of -nostdlib, the standard libraries should not be +// passed down to link line +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu -nostdlib --rtlib=compiler-rt \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu -nostdlib --rtlib=compiler-rt \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// CHECK-LINUX-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt' +// CHECK-LINUX-NOSTDLIB: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|}}lib{{/|}}linux{{/|}}libclang_rt.builtins-i686.a" Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -8694,8 +8694,7 @@ if (!isAndroid) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o"))); } - } else if (Args.hasArg(options::OPT_rtlib_EQ)) -AddRunTimeLibs(ToolChain, D, CmdArgs, Args); + } C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); } Index: test/Driver/nostdlib.c === --- test/Driver/nostdlib.c +++ test/Driver/nostdlib.c @@ -9,3 +9,19 @@ // RUN: %clang -### -nostartfiles -nostdlib -target i386-apple-darwin %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=ARGSCLAIMED // ARGSCLAIMED-NOT: warning: + +// In the presence of -nostdlib, the standard libraries should not be +// passed down to link line +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu -nostdlib --rtlib=compiler-rt \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu -nostdlib --rtlib=compiler-rt \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// CHECK-LINUX-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt' +// CHECK-LINUX-NOSTDLIB: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|}}lib{{/|}}linux{{/|}}libclang_rt.builtins-i686.a" Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -8694,8 +8694,7 @@ if (!isAndroid) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o"))); } - } else if (Args.hasArg(options::OPT_rtlib_EQ)) -AddRunTimeLibs(ToolChain, D, CmdArgs, Args); + } C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); } ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D15130: Fix the clang driver when "-nostdlib" is present
sgundapa updated this revision to Diff 41582. http://reviews.llvm.org/D15130 Files: lib/Driver/Tools.cpp test/Driver/nostdlib.c Index: test/Driver/nostdlib.c === --- test/Driver/nostdlib.c +++ test/Driver/nostdlib.c @@ -9,3 +9,19 @@ // RUN: %clang -### -nostartfiles -nostdlib -target i386-apple-darwin %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=ARGSCLAIMED // ARGSCLAIMED-NOT: warning: + +// In the presence of -nostdlib, the standard libraries should not be +// passed down to link line +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu -nostdlib --rtlib=compiler-rt \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu --rtlib=compiler-rt -nostdlib \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// CHECK-LINUX-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt' +// CHECK-LINUX-NOSTDLIB: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|}}lib{{/|}}linux{{/|}}libclang_rt.builtins-i686.a" Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -8694,8 +8694,7 @@ if (!isAndroid) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o"))); } - } else if (Args.hasArg(options::OPT_rtlib_EQ)) -AddRunTimeLibs(ToolChain, D, CmdArgs, Args); + } C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); } Index: test/Driver/nostdlib.c === --- test/Driver/nostdlib.c +++ test/Driver/nostdlib.c @@ -9,3 +9,19 @@ // RUN: %clang -### -nostartfiles -nostdlib -target i386-apple-darwin %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=ARGSCLAIMED // ARGSCLAIMED-NOT: warning: + +// In the presence of -nostdlib, the standard libraries should not be +// passed down to link line +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu -nostdlib --rtlib=compiler-rt \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu --rtlib=compiler-rt -nostdlib \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// CHECK-LINUX-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt' +// CHECK-LINUX-NOSTDLIB: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|}}lib{{/|}}linux{{/|}}libclang_rt.builtins-i686.a" Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -8694,8 +8694,7 @@ if (!isAndroid) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o"))); } - } else if (Args.hasArg(options::OPT_rtlib_EQ)) -AddRunTimeLibs(ToolChain, D, CmdArgs, Args); + } C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); } ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r254535 - Fix the clang driver when "-nostdlib" is present
Author: sgundapa Date: Wed Dec 2 13:12:41 2015 New Revision: 254535 URL: http://llvm.org/viewvc/llvm-project?rev=254535&view=rev Log: Fix the clang driver when "-nostdlib" is present This patch is a fix to r252901 which changed the behavior of clang driver. In the presence of "-nostdlib" none of the standard libraries should be passed to link line. Differential Revision: http://reviews.llvm.org/D15130 Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/nostdlib.c Modified: cfe/trunk/lib/Driver/Tools.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=254535&r1=254534&r2=254535&view=diff == --- cfe/trunk/lib/Driver/Tools.cpp (original) +++ cfe/trunk/lib/Driver/Tools.cpp Wed Dec 2 13:12:41 2015 @@ -8694,8 +8694,7 @@ void gnutools::Linker::ConstructJob(Comp if (!isAndroid) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o"))); } - } else if (Args.hasArg(options::OPT_rtlib_EQ)) -AddRunTimeLibs(ToolChain, D, CmdArgs, Args); + } C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); } Modified: cfe/trunk/test/Driver/nostdlib.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/nostdlib.c?rev=254535&r1=254534&r2=254535&view=diff == --- cfe/trunk/test/Driver/nostdlib.c (original) +++ cfe/trunk/test/Driver/nostdlib.c Wed Dec 2 13:12:41 2015 @@ -9,3 +9,19 @@ // RUN: %clang -### -nostartfiles -nostdlib -target i386-apple-darwin %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=ARGSCLAIMED // ARGSCLAIMED-NOT: warning: + +// In the presence of -nostdlib, the standard libraries should not be +// passed down to link line +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu -nostdlib --rtlib=compiler-rt \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu --rtlib=compiler-rt -nostdlib \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// CHECK-LINUX-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt' +// CHECK-LINUX-NOSTDLIB: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|}}lib{{/|}}linux{{/|}}libclang_rt.builtins-i686.a" ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D15130: Fix the clang driver when "-nostdlib" is present
This revision was automatically updated to reflect the committed changes. Closed by commit rL254535: Fix the clang driver when "-nostdlib" is present (authored by sgundapa). Changed prior to commit: http://reviews.llvm.org/D15130?vs=41582&id=41650#toc Repository: rL LLVM http://reviews.llvm.org/D15130 Files: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/nostdlib.c Index: cfe/trunk/test/Driver/nostdlib.c === --- cfe/trunk/test/Driver/nostdlib.c +++ cfe/trunk/test/Driver/nostdlib.c @@ -9,3 +9,19 @@ // RUN: %clang -### -nostartfiles -nostdlib -target i386-apple-darwin %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=ARGSCLAIMED // ARGSCLAIMED-NOT: warning: + +// In the presence of -nostdlib, the standard libraries should not be +// passed down to link line +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu -nostdlib --rtlib=compiler-rt \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu --rtlib=compiler-rt -nostdlib \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// CHECK-LINUX-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt' +// CHECK-LINUX-NOSTDLIB: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|}}lib{{/|}}linux{{/|}}libclang_rt.builtins-i686.a" Index: cfe/trunk/lib/Driver/Tools.cpp === --- cfe/trunk/lib/Driver/Tools.cpp +++ cfe/trunk/lib/Driver/Tools.cpp @@ -8694,8 +8694,7 @@ if (!isAndroid) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o"))); } - } else if (Args.hasArg(options::OPT_rtlib_EQ)) -AddRunTimeLibs(ToolChain, D, CmdArgs, Args); + } C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); } Index: cfe/trunk/test/Driver/nostdlib.c === --- cfe/trunk/test/Driver/nostdlib.c +++ cfe/trunk/test/Driver/nostdlib.c @@ -9,3 +9,19 @@ // RUN: %clang -### -nostartfiles -nostdlib -target i386-apple-darwin %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=ARGSCLAIMED // ARGSCLAIMED-NOT: warning: + +// In the presence of -nostdlib, the standard libraries should not be +// passed down to link line +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu -nostdlib --rtlib=compiler-rt \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target i686-pc-linux-gnu --rtlib=compiler-rt -nostdlib \ +// RUN: -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \ +// RUN: | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s +// +// CHECK-LINUX-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt' +// CHECK-LINUX-NOSTDLIB: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|}}lib{{/|}}linux{{/|}}libclang_rt.builtins-i686.a" Index: cfe/trunk/lib/Driver/Tools.cpp === --- cfe/trunk/lib/Driver/Tools.cpp +++ cfe/trunk/lib/Driver/Tools.cpp @@ -8694,8 +8694,7 @@ if (!isAndroid) CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o"))); } - } else if (Args.hasArg(options::OPT_rtlib_EQ)) -AddRunTimeLibs(ToolChain, D, CmdArgs, Args); + } C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); } ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D15577: [PS4] Fix the unit test to be compatible with clang driver. NFC
sgundapa created this revision. sgundapa added reviewers: eugenis, filcab. sgundapa added a subscriber: cfe-commits. ".exe" extension is inherently checked by llvm::fs::can_execute() This patch fixes the linker extension in clang driver and updates the unit test to accommodate the the check string on windows. http://reviews.llvm.org/D15577 Files: lib/Driver/Tools.cpp test/Driver/sanitizer-ld.c Index: test/Driver/sanitizer-ld.c === --- test/Driver/sanitizer-ld.c +++ test/Driver/sanitizer-ld.c @@ -379,19 +379,19 @@ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-UBSAN-PS4 %s -// CHECK-UBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-UBSAN-PS4: "{{.*}}ld{{(.gold.exe)?}}" // CHECK-UBSAN-PS4: -lSceDbgUBSanitizer_stub_weak // RUN: %clang -fsanitize=address %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-ASAN-PS4 %s -// CHECK-ASAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-ASAN-PS4: "{{.*}}ld{{(.gold.exe)?}}" // CHECK-ASAN-PS4: -lSceDbgAddressSanitizer_stub_weak // RUN: %clang -fsanitize=address,undefined %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-AUBSAN-PS4 %s -// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.gold.exe)?}}" // CHECK-AUBSAN-PS4: -lSceDbgAddressSanitizer_stub_weak Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -10438,7 +10438,7 @@ const char *Exec = #ifdef LLVM_ON_WIN32 - Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold.exe")); + Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold")); #else Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld")); #endif Index: test/Driver/sanitizer-ld.c === --- test/Driver/sanitizer-ld.c +++ test/Driver/sanitizer-ld.c @@ -379,19 +379,19 @@ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-UBSAN-PS4 %s -// CHECK-UBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-UBSAN-PS4: "{{.*}}ld{{(.gold.exe)?}}" // CHECK-UBSAN-PS4: -lSceDbgUBSanitizer_stub_weak // RUN: %clang -fsanitize=address %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-ASAN-PS4 %s -// CHECK-ASAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-ASAN-PS4: "{{.*}}ld{{(.gold.exe)?}}" // CHECK-ASAN-PS4: -lSceDbgAddressSanitizer_stub_weak // RUN: %clang -fsanitize=address,undefined %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-AUBSAN-PS4 %s -// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.gold.exe)?}}" // CHECK-AUBSAN-PS4: -lSceDbgAddressSanitizer_stub_weak Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -10438,7 +10438,7 @@ const char *Exec = #ifdef LLVM_ON_WIN32 - Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold.exe")); + Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold")); #else Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld")); #endif ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D15579: Fix the failing windows clang unit tests. NFC
sgundapa created this revision. sgundapa added reviewers: martell, yaron.keren, dougk, chapuni. sgundapa added a subscriber: cfe-commits. All the tests are missing the {{(.exe)?}} suffix on the exectables which the FileCheck is grepping for. http://reviews.llvm.org/D15579 Files: test/Driver/mingw-useld.c test/Driver/mips-mti-linux.c test/Driver/myriad-toolchain.c Index: test/Driver/myriad-toolchain.c === --- test/Driver/myriad-toolchain.c +++ test/Driver/myriad-toolchain.c @@ -38,8 +38,8 @@ // RUN: %clang -target shave-myriad -c -### %s -isystem somewhere -Icommon -Wa,-yippee 2>&1 \ // RUN: | FileCheck %s -check-prefix=MOVICOMPILE -// MOVICOMPILE: moviCompile" "-S" "-fno-exceptions" "-mcpu=myriad2" "-DMYRIAD2" "-isystem" "somewhere" "-I" "common" -// MOVICOMPILE: moviAsm" "-no6thSlotCompression" "-cv:myriad2" "-noSPrefixing" "-a" +// MOVICOMPILE: moviCompile{{(.exe)?}}" "-S" "-fno-exceptions" "-mcpu=myriad2" "-DMYRIAD2" "-isystem" "somewhere" "-I" "common" +// MOVICOMPILE: moviAsm{{(.exe)?}}" "-no6thSlotCompression" "-cv:myriad2" "-noSPrefixing" "-a" // MOVICOMPILE: "-yippee" "-i:somewhere" "-i:common" "-elf" // RUN: %clang -target shave-myriad -c -### %s -DEFINE_ME -UNDEFINE_ME 2>&1 \ Index: test/Driver/mips-mti-linux.c === --- test/Driver/mips-mti-linux.c +++ test/Driver/mips-mti-linux.c @@ -4,6 +4,7 @@ //it here to test that we are producing the correct paths/flags. //Ideally, we'd like to have an --llvm-toolchain option similar to //the --gcc-toolchain one. +// REQUIRES: mips-registered-target // = Big-endian, mips32r2, hard float // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ Index: test/Driver/mingw-useld.c === --- test/Driver/mingw-useld.c +++ test/Driver/mingw-useld.c @@ -1,19 +1,19 @@ // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_LD_32 %s -// CHECK_LD_32: {{ld|ld.exe}}" +// CHECK_LD_32: ld{{(.exe)?}}" // CHECK_LD_32: "i386pe" // CHECK_LD_32-NOT: "-flavor" "gnu" // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_32 %s // CHECK_LLD_32-NOT: invalid linker name in argument -// CHECK_LLD_32: lld" "-flavor" "gnu" +// CHECK_LLD_32: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_32: "i386pe" // RUN: %clang -### -target x86_64-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_64 %s // CHECK_LLD_64-NOT: invalid linker name in argument -// CHECK_LLD_64: lld" "-flavor" "gnu" +// CHECK_LLD_64: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_64: "i386pep" // RUN: %clang -### -target arm-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_ARM %s // CHECK_LLD_ARM-NOT: invalid linker name in argument -// CHECK_LLD_ARM: lld" "-flavor" "gnu" +// CHECK_LLD_ARM: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_ARM: "thumb2pe" Index: test/Driver/myriad-toolchain.c === --- test/Driver/myriad-toolchain.c +++ test/Driver/myriad-toolchain.c @@ -38,8 +38,8 @@ // RUN: %clang -target shave-myriad -c -### %s -isystem somewhere -Icommon -Wa,-yippee 2>&1 \ // RUN: | FileCheck %s -check-prefix=MOVICOMPILE -// MOVICOMPILE: moviCompile" "-S" "-fno-exceptions" "-mcpu=myriad2" "-DMYRIAD2" "-isystem" "somewhere" "-I" "common" -// MOVICOMPILE: moviAsm" "-no6thSlotCompression" "-cv:myriad2" "-noSPrefixing" "-a" +// MOVICOMPILE: moviCompile{{(.exe)?}}" "-S" "-fno-exceptions" "-mcpu=myriad2" "-DMYRIAD2" "-isystem" "somewhere" "-I" "common" +// MOVICOMPILE: moviAsm{{(.exe)?}}" "-no6thSlotCompression" "-cv:myriad2" "-noSPrefixing" "-a" // MOVICOMPILE: "-yippee" "-i:somewhere" "-i:common" "-elf" // RUN: %clang -target shave-myriad -c -### %s -DEFINE_ME -UNDEFINE_ME 2>&1 \ Index: test/Driver/mips-mti-linux.c === --- test/Driver/mips-mti-linux.c +++ test/Driver/mips-mti-linux.c @@ -4,6 +4,7 @@ //it here to test that we are producing the correct paths/flags. //Ideally, we'd like to have an --llvm-toolchain option similar to //the --gcc-toolchain one. +// REQUIRES: mips-registered-target // = Big-endian, mips32r2, hard float // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ Index: test/Driver/mingw-useld.c === --- test/Driver/mingw-useld.c +++ test/Driver/mingw-useld.c @@ -1,19 +1,19 @@ // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK
Re: [PATCH] D15579: Fix the failing windows clang unit tests. NFC
sgundapa added a comment. I can not seem to possibly find a windows community bot. It would be nice if some one can point me to that. http://reviews.llvm.org/D15579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D15577: [PS4] Fix the unit test to be compatible with clang driver. NFC
sgundapa added a comment. GetProgramPath will take care of the extension. I will change the line to "{{.*}}ld{{(.gold)?(.exe)?}}" as per your suggestion and push a new patch http://reviews.llvm.org/D15577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D15577: [PS4] Fix the unit test to be compatible with clang driver. NFC
sgundapa updated this revision to Diff 43038. http://reviews.llvm.org/D15577 Files: lib/Driver/Tools.cpp test/Driver/sanitizer-ld.c Index: test/Driver/sanitizer-ld.c === --- test/Driver/sanitizer-ld.c +++ test/Driver/sanitizer-ld.c @@ -379,19 +379,19 @@ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-UBSAN-PS4 %s -// CHECK-UBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-UBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-UBSAN-PS4: -lSceDbgUBSanitizer_stub_weak // RUN: %clang -fsanitize=address %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-ASAN-PS4 %s -// CHECK-ASAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-ASAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-ASAN-PS4: -lSceDbgAddressSanitizer_stub_weak // RUN: %clang -fsanitize=address,undefined %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-AUBSAN-PS4 %s -// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-AUBSAN-PS4: -lSceDbgAddressSanitizer_stub_weak Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -10438,7 +10438,7 @@ const char *Exec = #ifdef LLVM_ON_WIN32 - Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold.exe")); + Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold")); #else Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld")); #endif Index: test/Driver/sanitizer-ld.c === --- test/Driver/sanitizer-ld.c +++ test/Driver/sanitizer-ld.c @@ -379,19 +379,19 @@ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-UBSAN-PS4 %s -// CHECK-UBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-UBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-UBSAN-PS4: -lSceDbgUBSanitizer_stub_weak // RUN: %clang -fsanitize=address %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-ASAN-PS4 %s -// CHECK-ASAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-ASAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-ASAN-PS4: -lSceDbgAddressSanitizer_stub_weak // RUN: %clang -fsanitize=address,undefined %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-AUBSAN-PS4 %s -// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-AUBSAN-PS4: -lSceDbgAddressSanitizer_stub_weak Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -10438,7 +10438,7 @@ const char *Exec = #ifdef LLVM_ON_WIN32 - Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold.exe")); + Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold")); #else Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld")); #endif ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r255804 - Fix the failing windows clang unit tests. NFC
Author: sgundapa Date: Wed Dec 16 13:09:51 2015 New Revision: 255804 URL: http://llvm.org/viewvc/llvm-project?rev=255804&view=rev Log: Fix the failing windows clang unit tests. NFC Some tests are missing the {{(.exe)?}} suffix on the exectables which the FileCheck is grepping for. This will ensure, the lit tests are clean on windows Differential Revision: http://reviews.llvm.org/D15579 Modified: cfe/trunk/test/Driver/mingw-useld.c cfe/trunk/test/Driver/mips-mti-linux.c cfe/trunk/test/Driver/myriad-toolchain.c Modified: cfe/trunk/test/Driver/mingw-useld.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mingw-useld.c?rev=255804&r1=255803&r2=255804&view=diff == --- cfe/trunk/test/Driver/mingw-useld.c (original) +++ cfe/trunk/test/Driver/mingw-useld.c Wed Dec 16 13:09:51 2015 @@ -1,19 +1,19 @@ // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_LD_32 %s -// CHECK_LD_32: {{ld|ld.exe}}" +// CHECK_LD_32: ld{{(.exe)?}}" // CHECK_LD_32: "i386pe" // CHECK_LD_32-NOT: "-flavor" "gnu" // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_32 %s // CHECK_LLD_32-NOT: invalid linker name in argument -// CHECK_LLD_32: lld" "-flavor" "gnu" +// CHECK_LLD_32: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_32: "i386pe" // RUN: %clang -### -target x86_64-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_64 %s // CHECK_LLD_64-NOT: invalid linker name in argument -// CHECK_LLD_64: lld" "-flavor" "gnu" +// CHECK_LLD_64: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_64: "i386pep" // RUN: %clang -### -target arm-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_ARM %s // CHECK_LLD_ARM-NOT: invalid linker name in argument -// CHECK_LLD_ARM: lld" "-flavor" "gnu" +// CHECK_LLD_ARM: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_ARM: "thumb2pe" Modified: cfe/trunk/test/Driver/mips-mti-linux.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mips-mti-linux.c?rev=255804&r1=255803&r2=255804&view=diff == --- cfe/trunk/test/Driver/mips-mti-linux.c (original) +++ cfe/trunk/test/Driver/mips-mti-linux.c Wed Dec 16 13:09:51 2015 @@ -4,6 +4,7 @@ //it here to test that we are producing the correct paths/flags. //Ideally, we'd like to have an --llvm-toolchain option similar to //the --gcc-toolchain one. +// REQUIRES: mips-registered-target // = Big-endian, mips32r2, hard float // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ Modified: cfe/trunk/test/Driver/myriad-toolchain.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/myriad-toolchain.c?rev=255804&r1=255803&r2=255804&view=diff == --- cfe/trunk/test/Driver/myriad-toolchain.c (original) +++ cfe/trunk/test/Driver/myriad-toolchain.c Wed Dec 16 13:09:51 2015 @@ -38,8 +38,8 @@ // RUN: %clang -target shave-myriad -c -### %s -isystem somewhere -Icommon -Wa,-yippee 2>&1 \ // RUN: | FileCheck %s -check-prefix=MOVICOMPILE -// MOVICOMPILE: moviCompile" "-S" "-fno-exceptions" "-mcpu=myriad2" "-DMYRIAD2" "-isystem" "somewhere" "-I" "common" -// MOVICOMPILE: moviAsm" "-no6thSlotCompression" "-cv:myriad2" "-noSPrefixing" "-a" +// MOVICOMPILE: moviCompile{{(.exe)?}}" "-S" "-fno-exceptions" "-mcpu=myriad2" "-DMYRIAD2" "-isystem" "somewhere" "-I" "common" +// MOVICOMPILE: moviAsm{{(.exe)?}}" "-no6thSlotCompression" "-cv:myriad2" "-noSPrefixing" "-a" // MOVICOMPILE: "-yippee" "-i:somewhere" "-i:common" "-elf" // RUN: %clang -target shave-myriad -c -### %s -DEFINE_ME -UNDEFINE_ME 2>&1 \ ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D15579: Fix the failing windows clang unit tests. NFC
This revision was automatically updated to reflect the committed changes. Closed by commit rL255804: Fix the failing windows clang unit tests. NFC (authored by sgundapa). Changed prior to commit: http://reviews.llvm.org/D15579?vs=43022&id=43040#toc Repository: rL LLVM http://reviews.llvm.org/D15579 Files: cfe/trunk/test/Driver/mingw-useld.c cfe/trunk/test/Driver/mips-mti-linux.c cfe/trunk/test/Driver/myriad-toolchain.c Index: cfe/trunk/test/Driver/mingw-useld.c === --- cfe/trunk/test/Driver/mingw-useld.c +++ cfe/trunk/test/Driver/mingw-useld.c @@ -1,19 +1,19 @@ // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_LD_32 %s -// CHECK_LD_32: {{ld|ld.exe}}" +// CHECK_LD_32: ld{{(.exe)?}}" // CHECK_LD_32: "i386pe" // CHECK_LD_32-NOT: "-flavor" "gnu" // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_32 %s // CHECK_LLD_32-NOT: invalid linker name in argument -// CHECK_LLD_32: lld" "-flavor" "gnu" +// CHECK_LLD_32: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_32: "i386pe" // RUN: %clang -### -target x86_64-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_64 %s // CHECK_LLD_64-NOT: invalid linker name in argument -// CHECK_LLD_64: lld" "-flavor" "gnu" +// CHECK_LLD_64: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_64: "i386pep" // RUN: %clang -### -target arm-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_ARM %s // CHECK_LLD_ARM-NOT: invalid linker name in argument -// CHECK_LLD_ARM: lld" "-flavor" "gnu" +// CHECK_LLD_ARM: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_ARM: "thumb2pe" Index: cfe/trunk/test/Driver/mips-mti-linux.c === --- cfe/trunk/test/Driver/mips-mti-linux.c +++ cfe/trunk/test/Driver/mips-mti-linux.c @@ -4,6 +4,7 @@ //it here to test that we are producing the correct paths/flags. //Ideally, we'd like to have an --llvm-toolchain option similar to //the --gcc-toolchain one. +// REQUIRES: mips-registered-target // = Big-endian, mips32r2, hard float // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ Index: cfe/trunk/test/Driver/myriad-toolchain.c === --- cfe/trunk/test/Driver/myriad-toolchain.c +++ cfe/trunk/test/Driver/myriad-toolchain.c @@ -38,8 +38,8 @@ // RUN: %clang -target shave-myriad -c -### %s -isystem somewhere -Icommon -Wa,-yippee 2>&1 \ // RUN: | FileCheck %s -check-prefix=MOVICOMPILE -// MOVICOMPILE: moviCompile" "-S" "-fno-exceptions" "-mcpu=myriad2" "-DMYRIAD2" "-isystem" "somewhere" "-I" "common" -// MOVICOMPILE: moviAsm" "-no6thSlotCompression" "-cv:myriad2" "-noSPrefixing" "-a" +// MOVICOMPILE: moviCompile{{(.exe)?}}" "-S" "-fno-exceptions" "-mcpu=myriad2" "-DMYRIAD2" "-isystem" "somewhere" "-I" "common" +// MOVICOMPILE: moviAsm{{(.exe)?}}" "-no6thSlotCompression" "-cv:myriad2" "-noSPrefixing" "-a" // MOVICOMPILE: "-yippee" "-i:somewhere" "-i:common" "-elf" // RUN: %clang -target shave-myriad -c -### %s -DEFINE_ME -UNDEFINE_ME 2>&1 \ Index: cfe/trunk/test/Driver/mingw-useld.c === --- cfe/trunk/test/Driver/mingw-useld.c +++ cfe/trunk/test/Driver/mingw-useld.c @@ -1,19 +1,19 @@ // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_LD_32 %s -// CHECK_LD_32: {{ld|ld.exe}}" +// CHECK_LD_32: ld{{(.exe)?}}" // CHECK_LD_32: "i386pe" // CHECK_LD_32-NOT: "-flavor" "gnu" // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_32 %s // CHECK_LLD_32-NOT: invalid linker name in argument -// CHECK_LLD_32: lld" "-flavor" "gnu" +// CHECK_LLD_32: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_32: "i386pe" // RUN: %clang -### -target x86_64-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_64 %s // CHECK_LLD_64-NOT: invalid linker name in argument -// CHECK_LLD_64: lld" "-flavor" "gnu" +// CHECK_LLD_64: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_64: "i386pep" // RUN: %clang -### -target arm-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_ARM %s // CHECK_LLD_ARM-NOT: invalid linker name in argument -// CHECK_LLD_ARM: lld" "-flavor" "gnu" +// CHECK_LLD_ARM: lld{{(.exe)?}}" "-flavor" "gnu" // CHECK_LLD_ARM: "thumb2pe" Index: cfe/trunk/test/Driver/mips-mti-linux.c
r255814 - [PS4] Fix the unit test to be compatible with clang driver. NFC
Author: sgundapa Date: Wed Dec 16 14:18:12 2015 New Revision: 255814 URL: http://llvm.org/viewvc/llvm-project?rev=255814&view=rev Log: [PS4] Fix the unit test to be compatible with clang driver. NFC ".exe" extension is inherently checked by llvm::fs::can_execute() This patch fixes the linker extension in clang driver and updates the unit test to accommodate the the check string on windows. Differential Revision:http://reviews.llvm.org/D15577 Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/sanitizer-ld.c Modified: cfe/trunk/lib/Driver/Tools.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=255814&r1=255813&r2=255814&view=diff == --- cfe/trunk/lib/Driver/Tools.cpp (original) +++ cfe/trunk/lib/Driver/Tools.cpp Wed Dec 16 14:18:12 2015 @@ -10440,7 +10440,7 @@ static void ConstructGoldLinkJob(const T const char *Exec = #ifdef LLVM_ON_WIN32 - Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold.exe")); + Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold")); #else Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld")); #endif Modified: cfe/trunk/test/Driver/sanitizer-ld.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/sanitizer-ld.c?rev=255814&r1=255813&r2=255814&view=diff == --- cfe/trunk/test/Driver/sanitizer-ld.c (original) +++ cfe/trunk/test/Driver/sanitizer-ld.c Wed Dec 16 14:18:12 2015 @@ -379,19 +379,19 @@ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-UBSAN-PS4 %s -// CHECK-UBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-UBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-UBSAN-PS4: -lSceDbgUBSanitizer_stub_weak // RUN: %clang -fsanitize=address %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-ASAN-PS4 %s -// CHECK-ASAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-ASAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-ASAN-PS4: -lSceDbgAddressSanitizer_stub_weak // RUN: %clang -fsanitize=address,undefined %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-AUBSAN-PS4 %s -// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-AUBSAN-PS4: -lSceDbgAddressSanitizer_stub_weak ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D15577: [PS4] Fix the unit test to be compatible with clang driver. NFC
This revision was automatically updated to reflect the committed changes. Closed by commit rL255814: [PS4] Fix the unit test to be compatible with clang driver. NFC (authored by sgundapa). Changed prior to commit: http://reviews.llvm.org/D15577?vs=43038&id=43049#toc Repository: rL LLVM http://reviews.llvm.org/D15577 Files: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/sanitizer-ld.c Index: cfe/trunk/test/Driver/sanitizer-ld.c === --- cfe/trunk/test/Driver/sanitizer-ld.c +++ cfe/trunk/test/Driver/sanitizer-ld.c @@ -379,19 +379,19 @@ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-UBSAN-PS4 %s -// CHECK-UBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-UBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-UBSAN-PS4: -lSceDbgUBSanitizer_stub_weak // RUN: %clang -fsanitize=address %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-ASAN-PS4 %s -// CHECK-ASAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-ASAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-ASAN-PS4: -lSceDbgAddressSanitizer_stub_weak // RUN: %clang -fsanitize=address,undefined %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-AUBSAN-PS4 %s -// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-AUBSAN-PS4: -lSceDbgAddressSanitizer_stub_weak Index: cfe/trunk/lib/Driver/Tools.cpp === --- cfe/trunk/lib/Driver/Tools.cpp +++ cfe/trunk/lib/Driver/Tools.cpp @@ -10440,7 +10440,7 @@ const char *Exec = #ifdef LLVM_ON_WIN32 - Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold.exe")); + Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold")); #else Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld")); #endif Index: cfe/trunk/test/Driver/sanitizer-ld.c === --- cfe/trunk/test/Driver/sanitizer-ld.c +++ cfe/trunk/test/Driver/sanitizer-ld.c @@ -379,19 +379,19 @@ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-UBSAN-PS4 %s -// CHECK-UBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-UBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-UBSAN-PS4: -lSceDbgUBSanitizer_stub_weak // RUN: %clang -fsanitize=address %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-ASAN-PS4 %s -// CHECK-ASAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-ASAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-ASAN-PS4: -lSceDbgAddressSanitizer_stub_weak // RUN: %clang -fsanitize=address,undefined %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-scei-ps4 \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-AUBSAN-PS4 %s -// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.exe)?}}" +// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-AUBSAN-PS4: -lSceDbgAddressSanitizer_stub_weak Index: cfe/trunk/lib/Driver/Tools.cpp === --- cfe/trunk/lib/Driver/Tools.cpp +++ cfe/trunk/lib/Driver/Tools.cpp @@ -10440,7 +10440,7 @@ const char *Exec = #ifdef LLVM_ON_WIN32 - Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold.exe")); + Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold")); #else Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld")); #endif ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [llvm] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)
sgundapa wrote: I've observed a significant regression in one of the AMDGPU benchmarks after applying this patch. The base address calculation within the unrolled loop seems to be the source. I've attached "before.log" and "after.log" files that detail the issue. The modified GEP format, introduced by this patch, doesn't align with the canonical form expected by the "separate-constant-offset-from-gep" pass. Consequently, the "straight line strength reduction" (SLSR) pass cannot optimize the computation. While the intention behind this patch, replicating some "split-gep" pass functionality, is understood, the unintended impact on the SLSR pass is notable. Before I delve into potential solutions, I would greatly appreciate your insights and perspective on this matter.[ [after.log](https://github.com/llvm/llvm-project/files/15299364/after.log) [before.log](https://github.com/llvm/llvm-project/files/15299365/before.log) ](url) https://github.com/llvm/llvm-project/pull/68882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [llvm] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)
sgundapa wrote: > @sgundapa Does #90802 fix the issue you're seeing? Unfortunately no. https://github.com/llvm/llvm-project/pull/68882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits