[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-04 Thread Paul T Robinson via cfe-commits
@@ -1353,6 +1353,19 @@ void CodeGenFunction::EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr) { C->setDoesNotThrow(); } +void CodeGenFunction::EmitFakeUse(Address Addr) { + // We do not emit a fake use if we want to apply optnone to this function, + // even if we mig

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-03 Thread Paul T Robinson via cfe-commits
@@ -1353,6 +1353,19 @@ void CodeGenFunction::EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr) { C->setDoesNotThrow(); } +void CodeGenFunction::EmitFakeUse(Address Addr) { + // We do not emit a fake use if we want to apply optnone to this function, + // even if we mig

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Paul T Robinson via cfe-commits
pogo59 wrote: FWIW, IMO the implicit-check-not idea was worth trying, but not worth keeping. Up to @jmorse though. https://github.com/llvm/llvm-project/pull/115497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-11-01 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. https://github.com/llvm/llvm-project/pull/114435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-10-31 Thread Paul T Robinson via cfe-commits
@@ -21,6 +21,22 @@ // CHECK-NO-PIE-NOT: "-pie" // CHECK-SHARED: "--shared" +// Test the driver supplies an --image-base to the linker only for non-pie +// executables. + +// RUN: %clang --target=x86_64-sie-ps5 -static %s -### 2>&1 | FileCheck --check-prefixes=CHECK-BASE %s +/

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-10-31 Thread Paul T Robinson via cfe-commits
@@ -295,6 +302,9 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (Shared) CmdArgs.push_back("--shared"); + if (!Relocatable && !Shared && !PIE) pogo59 wrote: Does this want to consider `Static` as well? Just wonderi

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-22 Thread Paul T Robinson via cfe-commits
@@ -240,11 +242,32 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back( Args.MakeArgString("--sysroot=" + TC.getSDKLibraryRootDir())); - // Default to PIE for non-static executables. - const bool PIE = - !Args.hasA

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-22 Thread Paul T Robinson via cfe-commits
@@ -240,11 +242,32 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back( Args.MakeArgString("--sysroot=" + TC.getSDKLibraryRootDir())); - // Default to PIE for non-static executables. - const bool PIE = - !Args.hasA

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-10-03 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 commented: It seems a little odd to have only positive forms of these flags; usually toggles would have both positive and negative forms. Maybe @MaskRay has an opinion? The release note doesn't say: Does `-fextend-lifetimes` imply `-fextend-this-pointer`? They're imp

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-27 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Filed #110313 as the followup for looking at the `for` statement. https://github.com/llvm/llvm-project/pull/108300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Paul T Robinson via cfe-commits
@@ -46,3 +46,26 @@ // CHECK-SYSROOT: {{ld(\.exe)?}}" // CHECK-SYSROOT-SAME: "--sysroot=mysdk" + +// Test that "." is always added to library search paths. This is long-standing +// behavior, unique to PlayStation toolchains. + +// RUN: %clang --target=x64_64-sie-ps5 %s -### 2>

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Paul T Robinson via cfe-commits
@@ -46,3 +46,26 @@ // CHECK-SYSROOT: {{ld(\.exe)?}}" // CHECK-SYSROOT-SAME: "--sysroot=mysdk" + +// Test that "." is always added to library search paths. This is long-standing +// behavior, unique to PlayStation toolchains. + +// RUN: %clang --target=x64_64-sie-ps5 %s -### 2>

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Paul T Robinson via cfe-commits
@@ -46,3 +46,26 @@ // CHECK-SYSROOT: {{ld(\.exe)?}}" // CHECK-SYSROOT-SAME: "--sysroot=mysdk" + +// Test that "." is always added to library search paths. This is long-standing +// behavior, unique to PlayStation toolchains. + +// RUN: %clang --target=x64_64-sie-ps5 %s -### 2>

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Paul T Robinson via cfe-commits
pogo59 wrote: My first thought was "why not use the nodebug attribute" but looking back at the Phab review, that question was raised and answered there. But I thought it was worth mentioning here. https://github.com/llvm/llvm-project/pull/109490 ___

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-23 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Wow, better than I expected, considering that .debug_line is not one of the larger sections. https://github.com/llvm/llvm-project/pull/108300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Paul T Robinson via cfe-commits
@@ -1379,6 +1379,9 @@ void DwarfUnit::applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie, if (!SP->getTargetFuncName().empty()) addString(SPDie, dwarf::DW_AT_trampoline, SP->getTargetFuncName()); + if (SP->isDebugTransparent()) pogo59 wrote:

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Paul T Robinson via cfe-commits
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) { cast(VD->getDeclContext())->isImplicit()); } +static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) { + if (!D) +return false; + + if (auto *attr = D->get

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-23 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/108300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-13 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 -debug-info-kind=limited -gno-column-info -triple=x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s + +// The important thing is that the compare and the conditional branch have +// locs with the same scope (the lexical block for the 'if'). B

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-12 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 -debug-info-kind=limited -gno-column-info -triple=x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s + +// The important thing is that the compare and the conditional branch have +// locs with the same scope (the lexical block for the 'if'). B

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-12 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 -debug-info-kind=limited -gno-column-info -triple=x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s + +// The important thing is that the compare and the conditional branch have +// locs with the same scope (the lexical block for the 'if'). B

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-11 Thread Paul T Robinson via cfe-commits
pogo59 wrote: This fixes the problem I describe in https://discourse.llvm.org/t/wrong-scope-in-dbg-on-a-branch-or-how-to-find-branchinst-create/81112 https://github.com/llvm/llvm-project/pull/108300 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-11 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/108300 An 'if' statement introduces a scope, but in some cases the conditional branch to the then/else blocks had a debug-info attribution that did not include the scope. This led to some inefficiency in the DWARF line

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-06 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM, but pointed out the need for a test comment update (& replicate to the PS5 equivalent test). https://github.com/llvm/llvm-project/pull/107410 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-06 Thread Paul T Robinson via cfe-commits
@@ -323,46 +323,63 @@ toolchains::PS4PS5Base::PS4PS5Base(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, StringRef Platform, const char *EnvVar) : Generic_ELF(D, Triple, Args) { - // D

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-06 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/107410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-06 Thread Paul T Robinson via cfe-commits
@@ -1,42 +1,64 @@ -// Check that PS4 clang doesn't report a warning message when locating -// system header files (either by looking at the value of SCE_ORBIS_SDK_DIR -// or relative to the location of the compiler driver), if "-nostdinc", -// "--sysroot" or "-isysroot" option is

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-06 Thread Paul T Robinson via cfe-commits
@@ -323,46 +323,63 @@ toolchains::PS4PS5Base::PS4PS5Base(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, StringRef Platform, const char *EnvVar) : Generic_ELF(D, Triple, Args) { - // D

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-05 Thread Paul T Robinson via cfe-commits
pogo59 wrote: FTR I have no good explanation for why the PS4 handling is in the state it's in--thanks for sorting this! https://github.com/llvm/llvm-project/pull/107410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-05 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 commented: According to [gcc docs](https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html) `--sysroot` applies to headers and libraries, and `-isysroot` overrides it for headers only. This is different from the "independence" described for World 2. That is, if we

[clang] [DebugInfo] Make a test more robust (PR #106463)

2024-09-04 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/106463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4,PS5][Driver] Check for absent SDK when -nostdlib/-nodefaultlibs (PR #107112)

2024-09-03 Thread Paul T Robinson via cfe-commits
@@ -36,9 +35,6 @@ // RUN: env SCE_ORBIS_SDK_DIR=.. %clang -Winvalid-or-nonexistent-directory -### -emit-ast -isysroot foo -target x86_64-scei-ps4 %s 2>&1 | FileCheck -check-prefix=WARN-ISYSROOT -check-prefix=NO-WARN %s // RUN: env SCE_ORBIS_SDK_DIR=.. %clang -Winvalid-or-nonex

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
@@ -2543,6 +2543,10 @@ void CodeGenModule::ConstructAttributeList(StringRef Name, if (shouldDisableTailCalls()) FuncAttrs.addAttribute("disable-tail-calls", "true"); +// Suppress the machine instruction scheduler when -fextend-lifetimes is on. +if (CodeGenO

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
@@ -1412,6 +1420,39 @@ void CodeGenFunction::EmitAndRegisterVariableArrayDimensions( } } +/// Return the maximum size of an aggregate for which we generate a fake use +/// intrinsic when -fextend-lifetimes is in effect. +static uint64_t maxFakeUseAggregateSize(const ASTCont

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/106724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
@@ -2523,6 +2575,15 @@ llvm::Function *CodeGenModule::getLLVMLifetimeEndFn() { return LifetimeEndFn; } +/// Lazily declare the @llvm.fake.use intrinsic. +llvm::Function *CodeGenModule::getLLVMFakeUseFn() { + if (FakeUseFn) +return FakeUseFn; + FakeUseFn = + llvm::

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
@@ -3558,15 +3562,26 @@ static llvm::StoreInst *findDominatingStoreToReturnValue(CodeGenFunction &CGF) { llvm::BasicBlock *IP = CGF.Builder.GetInsertBlock(); if (IP->empty()) return nullptr; -// Look at directly preceding instruction, skipping bitcasts and lifetim

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 commented: I didn't really look at the tests. Rather than saying the new options are "incompatible" with -O0, I'd say they are "ignored" at -O0, which is in fact how they are implemented. "Incompatible" suggests to me that there'd be a diagnostic, and there's no need

[clang] [DebugInfo] Make a test more robust (PR #106463)

2024-08-28 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/106463 This was accidentally matching a metadata record that happend to have three elements, but wasn't the record of interest. Add CHECKs to make sure we've found the correct record. >From 845fb7105d0e23df57ced47c1f1

[clang] [Headers][X86] Add a test for MMX/SSE intrinsics (PR #105852)

2024-08-27 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/105852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add a test for MMX/SSE intrinsics (PR #105852)

2024-08-27 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/105852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-26 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/105852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-26 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/105852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-26 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/105852 >From fbdf1c4a2bc88e1872bb6b91265b142319b7ccc8 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Fri, 23 Aug 2024 09:40:08 -0700 Subject: [PATCH 1/2] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-26 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,387 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only \ pogo59 wrote: Okay. https://github.com/llvm/llvm-project/pull/105852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-26 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,105 @@ +// RUN: %clang_cc1 -triple i386-unknown-unknown -target-feature +mmx \ +// RUN: -target-feature +sse2 -O0 -emit-llvm %s -o - | FileCheck %s + +// Test that mmx/sse2 shift intrinsics map to the expected builtins. + +// Don't include mm_malloc.h, it's system spec

[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

2024-08-26 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,22 @@ +import argparse pogo59 wrote: There is a lit substitution `%python` and I see a fair number of these in the lit tests. Some use inline python scripts, some have separate scripts, and a number of them have the python script directly in the test

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-23 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/105852 Certain intrinsics map to builtins that require an immediate (literal) argument; make sure we report non-literal arguments. Also verify that shift intrinsics map to the expected builtins. These have been kickin

[clang] [PS5][clang][test] x86_64-scei-ps5 -> x86_64-sie-ps5 in tests (PR #105810)

2024-08-23 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. I appreciate the pedantry. Internally these are equivalent, but SIE is the current company abbreviation so we should try to be consistent going forward. LGTM https://github.com/llvm/llvm-project/pull/105810 _

[clang] [Clang] Fix null pointer dereference in enum debug info generation (PR #105556)

2024-08-22 Thread Paul T Robinson via cfe-commits
pogo59 wrote: The patch title and description claims more than it actually does. The assertion does not "fix" or prevent a null dereference, it's simply documenting a requirement. Please update the title and description. https://github.com/llvm/llvm-project/pull/105556

[clang] [PS5][Driver] Link main components with -pie by default (PR #102901)

2024-08-20 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/102901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Split invalid-cpu-note tests (PR #104601)

2024-08-20 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Totally worth it, thanks! https://github.com/llvm/llvm-project/pull/104601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Correct comment on default for -falign-functions (PR #101257)

2024-07-31 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/101257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Correct comment on default for -falign-functions (PR #101257)

2024-07-31 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/101257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Correct comment on default for -falign-functions (PR #101257)

2024-07-31 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/101257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Pass correct alignment for -falign-functions with no argument (PR #101257)

2024-07-31 Thread Paul T Robinson via cfe-commits
pogo59 wrote: The driver can't really be poking down into LLVM's TargetLowering; at best it could be querying Clang's TargetInfo, which knows a lot about data alignment but does not currently have any knowledge of code alignment. So, I've reverted the change and instead fixed the incorrect com

[clang] [Driver] Pass correct alignment for -falign-functions with no argument (PR #101257)

2024-07-31 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/101257 >From a95ab9bfb7be8da6c4ebe0d207beff5a0a72bb9d Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Tue, 30 Jul 2024 15:17:14 -0700 Subject: [PATCH 1/2] [Driver] Pass correct alignment for -falign-functions with n

[clang] [Driver] Pass correct alignment for -falign-functions with no argument (PR #101257)

2024-07-30 Thread Paul T Robinson via cfe-commits
@@ -1982,7 +1982,7 @@ unsigned tools::ParseFunctionAlignment(const ToolChain &TC, return 0; if (A->getOption().matches(options::OPT_falign_functions)) -return 0; +return 4; // log2(16) pogo59 wrote: Ah, I should have said "the commentary" on Pa

[clang] [Driver] Pass correct alignment for -falign-functions with no argument (PR #101257)

2024-07-30 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/101257 -falign-functions with no argument is supposed to be equivalent to -falign-functions=16, according to the documentation. Make it so. >From a95ab9bfb7be8da6c4ebe0d207beff5a0a72bb9d Mon Sep 17 00:00:00 2001 From:

[clang] [PS4][Driver] Only pass -lto-debug-options to linker when necessary (PR #101202)

2024-07-30 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/101202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4/PS5][Driver] Allow unified-lto.c test to find .*ld.exe (PR #101034)

2024-07-29 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/101034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4/PS5][Driver] Always pass LTO options to the linker (PR #100423)

2024-07-24 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/100423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #100160)

2024-07-23 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,33 @@ +; This checks that .debug_aranges is always generated for the SCE debugger +; tuning. + +; RUN: llc -mtriple=x86_64 -debugger-tune=sce -filetype=obj %s -o %t +; RUN: llvm-dwarfdump -debug-aranges %t | FileCheck %s + +; CHECK: .debug_aranges contents: +; CHEC

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #100160)

2024-07-23 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. One nit on the test, otherwise LGTM. https://github.com/llvm/llvm-project/pull/100160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #100160)

2024-07-23 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/100160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5] Adopt new compiler-rt naming scheme for the profile library. (PR #99862)

2024-07-22 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/99862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #99629)

2024-07-19 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM with a comment nit. https://github.com/llvm/llvm-project/pull/99629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #99629)

2024-07-19 Thread Paul T Robinson via cfe-commits
@@ -354,6 +354,9 @@ DwarfDebug::DwarfDebug(AsmPrinter *A) UseLocSection = !TT.isNVPTX(); + // Always emits .debug_aranges for SCE tuning. pogo59 wrote: ```suggestion // Always emit .debug_aranges for SCE tuning. ``` https://github.com/llvm/llvm-project

[clang] [PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (PR #98884)

2024-07-15 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/98884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (PR #98884)

2024-07-15 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Looks like you don't have write permission so I'll merge it for you. https://github.com/llvm/llvm-project/pull/98884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (PR #98884)

2024-07-15 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/98884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Add option to select compiler-rt arch suffix (PR #89775)

2024-06-13 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/89775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Add option to select compiler-rt arch suffix (PR #89775)

2024-06-13 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Abandoning this. We'll work around the brokenness in our downstream repo. https://github.com/llvm/llvm-project/pull/89775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] (New) Add option to generate additional debug info for expression dereferencing pointer to pointers (PR #95298)

2024-06-13 Thread Paul T Robinson via cfe-commits
pogo59 wrote: You should have a look at [this imminent patch](https://github.com/llvm/llvm-project/pull/91724) which will affect your test. https://github.com/llvm/llvm-project/pull/95298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-11 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Well, hmmm, I dunno, a radical change like this really wants an RFC and weeks of debate, right? 😄 https://github.com/llvm/llvm-project/pull/95164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [llvm] [Driver] Add option to select compiler-rt arch suffix (PR #89775)

2024-06-11 Thread Paul T Robinson via cfe-commits
pogo59 wrote: > For my toolchain I can continue to carry a patch until this is all sorted. Same here; I'm just professionally offended by the brokenness. But I'm not the right person to drive an RFC. If nobody else is willing to, I'll abandon this and we'll do what we need to downstream to ha

[clang] [llvm] [Driver] Rearrange some Apple version testing (PR #94514)

2024-06-11 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,9 @@ +; Test emitting version_min directives. + +; RUN: llc %s -filetype=asm -o - --mtriple arm64-apple-tvos9.0.0 | FileCheck %s --check-prefix=TVOS pogo59 wrote: Right, this test has one arm64 command and two thumb commands. I just now pushed #9510

[clang] [llvm] [Driver] Rearrange some Apple version testing (PR #94514)

2024-06-11 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/94514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Rearrange some Apple version testing (PR #94514)

2024-06-11 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/94514 >From 19ddcbdf2eabb812b65bd194085777abc48eade4 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 5 Jun 2024 11:15:46 -0700 Subject: [PATCH 1/2] [Driver] Rearrange some Apple version testing There were four

[clang] [llvm] [Driver] Add option to select compiler-rt arch suffix (PR #89775)

2024-06-11 Thread Paul T Robinson via cfe-commits
pogo59 wrote: @MaskRay @tru How do we proceed with this? The current state is broken. https://github.com/llvm/llvm-project/pull/89775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-06-05 Thread Paul T Robinson via cfe-commits
pogo59 wrote: I wonder if a lot of the new target-specific headers don't need to be in clang/include. That subtree is for headers that declare the exported interface (exported to other libs/layers); if the target-specific headers are just there for splitting up the module, they can stay in cl

[clang] [llvm] [Driver] Rearrange some Apple version testing (PR #94514)

2024-06-05 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/94514 There were four tests in Driver that actually tested bits of Driver and bits of CodeGen, and therefore had target restrictions. Rework those four tests into one Driver test (with no target restrictions) and two t

[clang] [Driver] Fix the sysroot.c test properly (PR #94276)

2024-06-03 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/94276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix the sysroot.c test properly (PR #94276)

2024-06-03 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/94276 >From b4b78efe9c8119e6b4b1f539847e5678808bf715 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Mon, 3 Jun 2024 12:43:59 -0700 Subject: [PATCH] [Driver] Fix the sysroot.c test properly A DEFAULT_SYSROOT interfe

[clang] [Driver] Fix the sysroot.c test properly (PR #94276)

2024-06-03 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/94276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix the sysroot.c test properly (PR #94276)

2024-06-03 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Pls try in your environments to see if this solves the problem. https://github.com/llvm/llvm-project/pull/94276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix the sysroot.c test properly (PR #94276)

2024-06-03 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/94276 A DEFAULT_SYSROOT interfered with the test, apparently. See #95055. >From c89183017ef9719c92077c1be6fd282e22a98e4e Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Mon, 3 Jun 2024 12:43:59 -0700 Subject: [PATCH

[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-06-03 Thread Paul T Robinson via cfe-commits
pogo59 wrote: FTR, when I say I could not reproduce on X86 Windows, exactly what I did is build on an X86 Windows host but include only the AArch64 target. The test passed. https://github.com/llvm/llvm-project/pull/94055 ___ cfe-commits mailing list

[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-06-03 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Correctly written Driver tests do not depend on any particular target. All Driver code relevant to all targets is present in all cases. Exactly one test (out of 133) was failing on exactly two bots. I'm not saying what I did was the best thing; it was expedient, to get the bots g

[clang] Reapply "[CUDA] Fix a couple of driver tests that really weren't bein… (PR #94000)

2024-06-03 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Let's hope so! Done. https://github.com/llvm/llvm-project/pull/94000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix a CUDA test (PR #94258)

2024-06-03 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/94258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix a CUDA test (PR #94258)

2024-06-03 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/94258 See #94000 for a report of a downstream failure, this fixes it. >From 21fea52ae628f1105ea562b77f7987f87908d948 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Mon, 3 Jun 2024 10:08:42 -0700 Subject: [PATCH] [D

[clang] [Driver] Mark a test UNSUPPORTED to get the bots green again (PR #94253)

2024-06-03 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/94253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Mark a test UNSUPPORTED to get the bots green again (PR #94253)

2024-06-03 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/94253 After #94055 this test failed on ARM/AArch64-hosted Windows, but it's not clear why. >From b31aa18d5abb553e4c44eff338a8c9e8393986b7 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Mon, 3 Jun 2024 09:38:45 -07

[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-06-03 Thread Paul T Robinson via cfe-commits
pogo59 wrote: I'm seeing two bot failures: https://lab.llvm.org/buildbot/#/builders/60/builds/17462 https://lab.llvm.org/buildbot/#/builders/119/builds/18845 both for sysroot.c. These are Arm/AArch64 Windows bots, based on the names, which is not an environment I have available. I cannot reprodu

[clang] Reapply "[CUDA] Fix a couple of driver tests that really weren't bein… (PR #94000)

2024-06-03 Thread Paul T Robinson via cfe-commits
pogo59 wrote: If you add `--no-cuda-version-check` does the error go away? https://github.com/llvm/llvm-project/pull/94000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[CUDA] Fix a couple of driver tests that really weren't bein… (PR #94000)

2024-06-03 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Yeah lit is not so good at this; it means clang exited with an error, but lit is somehow eating the error message. @erichkeane If you could run that clang command manually and report the output, that would be extremely helpful. https://github.com/llvm/llvm-project/pull/94000

[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-06-03 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/94055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-06-03 Thread Paul T Robinson via cfe-commits
@@ -1,6 +1,4 @@ // REQUIRES: system-linux pogo59 wrote: I hope you feel empowered to post more cleanup patches upstream! https://github.com/llvm/llvm-project/pull/94055 ___ cfe-commits mailing list cfe-commits@lists.l

  1   2   3   4   >