forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged main:9c5003cc0c70 into amd-gfx:606d2d42f73e
Local branch amd-gfx 606d2d4 Merged main:81e3e7e5d455 into amd-gfx:207601c46e4e Remote branch main 9c5003c [RISCV] Implement RISCVInstrInfo::getMemOperandsWithOffsetWidth (llvm#73681)
- Loading branch information
Showing
39 changed files
with
1,496 additions
and
1,093 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Test that we can handle capturing structured bindings. | ||
// | ||
// RUN: rm -fr %t | ||
// RUN: mkdir %t | ||
// | ||
// RUN: %clang_cc1 -std=c++23 -triple %itanium_abi_triple \ | ||
// RUN: %s -emit-module-interface -o %t/m.pcm | ||
// RUN: %clang_cc1 -std=c++23 -triple %itanium_abi_triple \ | ||
// RUN: -S -emit-llvm -disable-llvm-passes %t/m.pcm \ | ||
// RUN: -o - | FileCheck %s | ||
|
||
export module m; | ||
|
||
struct s { | ||
int m; | ||
}; | ||
|
||
void f() { | ||
auto [x] = s(); | ||
[x] {}; | ||
} | ||
|
||
// Check that we can generate the LLVM IR expectedly. | ||
// CHECK: define{{.*}}@_ZGIW1m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Test to ensure that multiple rounds of dumping, using the | ||
// __memprof_profile_reset interface to close the initial file | ||
// and cause the profile to be reopened, works as expected. | ||
|
||
// RUN: %clangxx_memprof %s -o %t | ||
|
||
// RUN: rm -f %t.log.* | ||
// RUN: %env_memprof_opts=print_text=true:log_path=%t.log %run %t | ||
|
||
// Check both outputs, starting with the renamed initial dump, then remove it so | ||
// that the second glob matches a single file. | ||
// RUN: FileCheck %s < %t.log.*.sv | ||
// RUN: rm -f %t.log.*.sv | ||
// RUN: FileCheck %s < %t.log.* | ||
// CHECK: Memory allocation stack id | ||
|
||
#include <sanitizer/memprof_interface.h> | ||
#include <stdio.h> | ||
|
||
#include <stdlib.h> | ||
#include <string.h> | ||
#include <string> | ||
int main(int argc, char **argv) { | ||
char *x = (char *)malloc(10); | ||
memset(x, 0, 10); | ||
free(x); | ||
__memprof_profile_dump(); | ||
// Save the initial dump in a different file. | ||
std::string origname = __sanitizer_get_report_path(); | ||
std::string svname = origname + ".sv"; | ||
rename(origname.c_str(), svname.c_str()); | ||
// This should cause the current file descriptor to be closed and the | ||
// the internal state reset so that the profile filename is reopened | ||
// on the next write. | ||
__memprof_profile_reset(); | ||
// This will dump to origname again. | ||
__memprof_profile_dump(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.