[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-29 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4702 + + // Add or replace -ftime-trace` to the correct one to all clang jobs + for (auto &J : C.getJobs()) { dongjunduo wrote: > Whitney wrote: > > dongjunduo wrote: > > > Whitney wrote: >

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-29 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4702 + + // Add or replace -ftime-trace` to the correct one to all clang jobs + for (auto &J : C.getJobs()) { dongjunduo wrote: > Whitney wrote: > > Do you mean Add or replace the modified `

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-22 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4663 +void InferTimeTracePath(Compilation &C) { + bool TimeTrace = C.getArgs().getLastArg(options::OPT_ftime_trace) != nullptr; + bool TimeTraceFile = Usually bool variable has name that sta

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-11 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/tools/driver/cc1_main.cpp:260 +SmallString<128> TracePath(Clang->getFrontendOpts().TimeTracePath); +assert(!TracePath.empty()); if (auto profilerOutput = Clang->createOutputFile( According to llvm codi

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-11 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4786 +const std::string::size_type size = arg.size(); +char *buffer = new char[size + 1]; +memcpy(buffer, arg.c_str(), size + 1); dongjunduo wrote: > Whitney wrote: > >

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-09 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4786 +const std::string::size_type size = arg.size(); +char *buffer = new char[size + 1]; +memcpy(buffer, arg.c_str(), size + 1); Assert size not 0. Repository: rG

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-09 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4739 + // set data storing path of the options `-ftime-trace`, `-ftime-trace=` + bool TimeTrace = C.getArgs().getLastArg(options::OPT_ftime_trace) != nullptr; It would be cleaner if all th

[PATCH] D128048: Add a new clang option "-ftime-trace="

2022-06-30 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney accepted this revision. Whitney added inline comments. Comment at: clang/tools/driver/cc1_main.cpp:265 + SmallString<128> TracePath(Clang->getFrontendOpts().TimeTracePath); + if (llvm::sys::fs::is_directory(TracePath)) { +llvm::sys::path::append(TracePat

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-30 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/test/Driver/check-time-trace.cpp:9 +// RUN: | FileCheck %s +// RUN: %clangxx -S -ftime-trace=%T -ftime-trace-granularity=0 -o %T/check-time-trace %s +// RUN: cat %T/check-time-trace.json \ By default, the JSON f

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-22 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added a comment. In D128048#3601579 , @jamieschmeiser wrote: > Can you please use git rebase -i to collapse all the changes into a single > change? If this isn't done, it is difficult to know what is being reviewed > as the changes only show t

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-20 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/include/clang/Driver/Options.td:2832 +def ftime_trace_path : Joined<["-"], "ftime-trace-path=">, Group, + HelpText<"Path which stores the output files of time profiler">, + Flags<[CC1Option, CoreOption]>, jamiesc

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-17 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added a comment. Can you please add some test cases? Comment at: clang/tools/driver/cc1_main.cpp:257 if (llvm::timeTraceProfilerEnabled()) { -SmallString<128> Path(Clang->getFrontendOpts().OutputFile); -llvm::sys::path::replace_extension(Path, "json"); +S

[PATCH] D106815: Update: clang/test/Profile/gcc-flag-compatibility.c to have -flto on AIX

2021-08-09 Thread Whitney Tsang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG39ca3e5541d0: Update: clang/test/Profile/gcc-flag-compatibility.c to have -flto on AIX (authored by madanial, committed by Whitney). Changed prior

[PATCH] D106815: Update: clang/test/Profile/gcc-flag-compatibility.c to have -flto on AIX

2021-08-09 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added a comment. In D106815#2926363 , @madanial wrote: > I need some help to commit this change as I do not have commit access as of > now. I will commit it for you today. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D106815: Update: clang/test/Profile/gcc-flag-compatibility.c to have -flto on AIX

2021-07-26 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/test/Profile/gcc-flag-compatibility.c:10 +// On AIX, -flto is required with -fprofile-generate +// XFAIL: aix Add in the comment that gcc-flag-compatibility-aix.c is used to do the testing on AIX. Repository:

[PATCH] D104803: [AIX] Emitting diagnostics error for profile options

2021-06-23 Thread Whitney Tsang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGab244db1fa0b: [AIX] Emitting diagnostics error for profile options (authored by Whitney). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104803/new/ https://

[PATCH] D104803: [AIX] Emitting diagnostics error for profile options

2021-06-23 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney updated this revision to Diff 354108. Whitney added a comment. move code later Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104803/new/ https://reviews.llvm.org/D104803 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/un

[PATCH] D104803: [AIX] Emitting diagnostics error for profile options

2021-06-23 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney updated this revision to Diff 354096. Whitney marked an inline comment as done. Whitney added a comment. Updated one of the test cases to use `--target=powerpc64-ibm-aix`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104803/new/ https://re

[PATCH] D104803: [AIX] Emitting diagnostics error for profile options

2021-06-23 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney created this revision. Whitney added reviewers: hubert.reinterpretcast, etiotto, bmahjour, kbarton, daltenty. Whitney added a project: LLVM. Whitney requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Only LLVM-based instrumentation pr

[PATCH] D84886: Create LoopNestPass

2020-08-19 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added a comment. > I was trying to convert the LoopInterchange pass into a loop-nest pass. > However, there seems to be no corresponding loop pass for the NPM. > Any particular reason for this? That's true, LoopInterchange pass is not already ported to the NPM, likely because no one nee

[PATCH] D84886: Create LoopNestPass

2020-08-12 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added a comment. Examples of existing transformations that can be benefited from LoopNestPass: LoopInterchange, LoopUnrollAndJam, LoopFusion, LoopIdiom, LoopDistribution, ... And their corresponding cost model analyses can be benefited from LoopNestAnalysis, e.g. LoopCacheCost. Reposi